Home
last modified time | relevance | path

Searched refs:DecimalFormat (Results 1 – 25 of 35) sorted by relevance

12

/libcore/ojluni/src/test/java/text/Format/NumberFormat/
DBigDecimalFormat.java110 ((DecimalFormat)nf).applyPattern("#,##0.###"); in test_Format_in_NumberFormat_BigDecimal()
118 checkFormat(from, formatted, from, ((DecimalFormat)nf).getMultiplier()); in test_Format_in_NumberFormat_BigDecimal()
129 checkFormat(from, formatted, from, ((DecimalFormat)nf).getMultiplier()); in test_Format_in_NumberFormat_BigDecimal()
137 fp = new FieldPosition(DecimalFormat.INTEGER_FIELD); in test_Format_in_NumberFormat_BigDecimal()
142 checkFormat(from, formatted, to, ((DecimalFormat)nf).getMultiplier()); in test_Format_in_NumberFormat_BigDecimal()
150 fp = new FieldPosition(DecimalFormat.FRACTION_FIELD); in test_Format_in_NumberFormat_BigDecimal()
155 checkFormat(from, formatted, to, ((DecimalFormat)nf).getMultiplier()); in test_Format_in_NumberFormat_BigDecimal()
166 checkFormat(from, formatted, to, ((DecimalFormat)nf).getMultiplier()); in test_Format_in_NumberFormat_BigDecimal()
176 checkFormat(from, formatted, to, ((DecimalFormat)nf).getMultiplier()); in test_Format_in_NumberFormat_BigDecimal()
186 checkFormat(from, formatted, to, ((DecimalFormat)nf).getMultiplier()); in test_Format_in_NumberFormat_BigDecimal()
[all …]
DBigDecimalParse.java110 DecimalFormat df;
116 df = new DecimalFormat(); in test_Parse_in_DecimalFormat_BigDecimal()
158 df = new DecimalFormat(); in test_Parse_in_DecimalFormat_BigDecimal_usingMultiplier()
200 df = new DecimalFormat(); in test_Parse_in_DecimalFormat_BigDecimal_DivisionByZero()
221 df = new DecimalFormat(); in test_Parse_in_DecimalFormat_Double_DivisionByZero()
258 df = new DecimalFormat(); in test_Parse_in_DecimalFormat_Long_DivisionByZero()
279 df = new DecimalFormat(); in test_Parse_in_DecimalFormat_BigInteger()
304 df = new DecimalFormat(); in test_Parse_in_DecimalFormat_BigInteger_usingMultiplier()
345 df = new DecimalFormat(); in test_Parse_in_DecimalFormat_SpecialNumber()
386 df = new DecimalFormat(); in test_Parse_in_DecimalFormat_Other()
[all …]
DSerializationLoadTest.java39 import java.text.DecimalFormat;
75 DecimalFormat _decFormat = (DecimalFormat)NumberFormat.getInstance();
DSerializationSaveTest.java64 DecimalFormat _decFormat = (DecimalFormat)NumberFormat.getInstance();
DDFSExponential.java72 DecimalFormat fmt = new DecimalFormat(pat[p], sym); in DFSExponenTest()
DPositionTest.java153 DecimalFormat fmt = (DecimalFormat) NumberFormat.getInstance(); in TestFieldPosition_example()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DDecimalFormatTest.java25 import java.text.DecimalFormat;
49 DecimalFormat df = new DecimalFormat(); in test_setNan_emptyString()
56 AttributedCharacterIterator iterator = new DecimalFormat().formatToCharacterIterator( in testAttributedCharacterIterator()
64 DecimalFormat form = (DecimalFormat) DecimalFormat.getInstance(Locale.US); in test_parse_bigDecimal()
80 DecimalFormat format = new DecimalFormat(); in test_parse_integerOnly()
96 DecimalFormat form = (DecimalFormat) NumberFormat.getInstance(Locale.US); in test_parse_returnType()
103 form = (DecimalFormat) NumberFormat.getInstance(Locale.US); in test_parse_returnType()
117 form = (DecimalFormat) NumberFormat.getInstance(Locale.US); in test_parse_returnType()
143 form = (DecimalFormat) NumberFormat.getInstance(Locale.US); in test_parse_returnType()
152 form = (DecimalFormat) NumberFormat.getInstance(Locale.US); in test_parse_returnType()
[all …]
DNumberFormatTest.java21 import java.text.DecimalFormat;
38 DecimalFormat format = (DecimalFormat) NumberFormat in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition()
125 DecimalFormat format = (DecimalFormat) NumberFormat in test_getIntegerInstance()
153 DecimalFormat format = (DecimalFormat) NumberFormat in test_getIntegerInstanceLjava_util_Locale()
174 format = (DecimalFormat) NumberFormat.getIntegerInstance(arLocale); in test_getIntegerInstanceLjava_util_Locale()
DSupport_DecimalFormat.java20 import java.text.DecimalFormat;
41 DecimalFormat format = (DecimalFormat) NumberFormat.getCurrencyInstance(Locale.US); in t_format_with_FieldPosition()
60 format = new DecimalFormat("000000000.0#E0"); in t_format_with_FieldPosition()
78 format = (DecimalFormat) NumberFormat.getCurrencyInstance(new Locale("tr", "TR")); in t_format_with_FieldPosition()
115 DecimalFormat format = new DecimalFormat("###0.##\u2030"); in t_formatToCharacterIterator()
119 format = new DecimalFormat("00.0#E0"); in t_formatToCharacterIterator()
123 format = new DecimalFormat("0000.0#E0"); in t_formatToCharacterIterator()
DDecimalFormatSymbolsTest.java26 import java.text.DecimalFormat;
286 DecimalFormatSymbols dfs = ((DecimalFormat) NumberFormat in test_setCurrencyLjava_util_Currency()
369 DecimalFormatSymbols dfs = ((DecimalFormat) NumberFormat in test_setInternationalCurrencySymbolLjava_lang_String()
/libcore/luni/src/test/java/libcore/java/text/
DDecimalFormatTest.java27 import java.text.DecimalFormat;
37 DecimalFormat df = new DecimalFormat("0E0"); in test_exponentSeparator()
47 DecimalFormat df = (DecimalFormat) DecimalFormat.getInstance(Locale.US); in test_setMaximumFractionDigitsAffectsRoundingMode()
129 DecimalFormat df = (DecimalFormat) NumberFormat.getNumberInstance(Locale.US); in testFieldPosition()
130 DecimalFormat currencyDf = (DecimalFormat) NumberFormat.getCurrencyInstance(Locale.US); in testFieldPosition()
131 DecimalFormat percentDf = (DecimalFormat) NumberFormat.getPercentInstance(Locale.US); in testFieldPosition()
132 DecimalFormat milledf = (DecimalFormat) NumberFormat.getInstance(Locale.US); in testFieldPosition()
134 DecimalFormat scientificDf = (DecimalFormat) NumberFormat.getNumberInstance(Locale.US); in testFieldPosition()
182 private void assertFieldPosition4Types(DecimalFormat df, long num, NumberFormat.Field field, in assertFieldPosition4Types()
193 private void assertFieldPosition(DecimalFormat df, long num, NumberFormat.Field field, in assertFieldPosition()
[all …]
DOldDecimalFormatTestICU.java19 import java.text.DecimalFormat;
32 DecimalFormat format;
35 format = (DecimalFormat) NumberFormat.getNumberInstance(); in setUp()
40 DecimalFormat format = (DecimalFormat) NumberFormat in test_sigDigitPatterns()
DNumberFormatTest.java21 import java.text.DecimalFormat;
73 String patternNI = ((DecimalFormat) numberFormat).toPattern(); in test_getIntegerInstance_ar()
76 String patternII = ((DecimalFormat) integerFormat).toPattern(); in test_getIntegerInstance_ar()
161 DecimalFormatSymbols decimalFormatSymbols = ((DecimalFormat) nf).getDecimalFormatSymbols(); in test_issue79925()
163 ((DecimalFormat) nf).setDecimalFormatSymbols(decimalFormatSymbols); in test_issue79925()
182 DecimalFormatSymbols dfs = ((DecimalFormat) nf).getDecimalFormatSymbols(); in test_customCurrencySymbol()
184 ((DecimalFormat) nf).setDecimalFormatSymbols(dfs); in test_customCurrencySymbol()
193 ((DecimalFormat) nf).setDecimalFormatSymbols(dfs); in test_customCurrencySymbol()
DOldNumberFormatTest.java23 import java.text.DecimalFormat;
35 DecimalFormat format = (DecimalFormat) NumberFormat.getIntegerInstance(Locale.US); in test_getIntegerInstanceLjava_util_Locale()
45 format = (DecimalFormat) NumberFormat.getIntegerInstance(chLocale); in test_getIntegerInstanceLjava_util_Locale()
54 format = (DecimalFormat) NumberFormat.getIntegerInstance(arLocale); in test_getIntegerInstanceLjava_util_Locale()
350 "#,##0.###", ((DecimalFormat) format).toPattern()); in test_getInstance()
365 assertEquals("#,##0.###", ((DecimalFormat) format).toPattern()); in test_getInstanceLjava_util_Locale()
388 "#,##0.###", ((DecimalFormat) format).toPattern()); in test_getNumberInstance()
402 assertEquals("#,##0.###", ((DecimalFormat) format).toPattern()); in test_getNumberInstanceLjava_util_Locale()
425 "#,##0%", ((DecimalFormat) format).toPattern()); in test_getPercentInstance()
440 assertEquals("#,##0\u00a0%", ((DecimalFormat) format).toPattern()); in test_getPercentInstanceLjava_util_Locale()
/libcore/benchmarks/src/benchmarks/regression/
DDecimalFormatBenchmark.java4 import java.text.DecimalFormat;
12 private static final DecimalFormat df = (DecimalFormat) DecimalFormat.getInstance();
14 private static final DecimalFormat patternInstance = (DecimalFormat)
15 DecimalFormat.getInstance();
16 private static final DecimalFormat dfCurrencyUS = (DecimalFormat)
18 private static final DecimalFormat dfCurrencyFR = (DecimalFormat)
159 new DecimalFormat(); in time_instantiation()
DBidiBenchmark.java22 import java.text.DecimalFormat;
27 DecimalFormat.getInstance().formatToCharacterIterator(new BigDecimal(Math.PI));
/libcore/ojluni/src/test/java/text/Format/DecimalFormat/
DSetGroupingSizeTest.java32 package test.java.text.Format.DecimalFormat;
34 import java.text.DecimalFormat;
65 DecimalFormat df = new DecimalFormat(); in test_validGroupingSize()
73 DecimalFormat df = new DecimalFormat(); in test_invalidGroupingSize()
DBug8165466.java32 package test.java.text.Format.DecimalFormat;
34 import java.text.DecimalFormat;
40 DecimalFormat nf = (DecimalFormat) DecimalFormat in main()
DGoldenFormattedValues.java24 package test.java.text.Format.DecimalFormat;
/libcore/luni/src/test/java/libcore/highmemorytest/java/text/
DDecimalFormatTest.java25 import java.text.DecimalFormat;
46 String formattedZero = new DecimalFormat("0", dfs).format(0); in testCurrencySymbolSpacing()
59 DecimalFormat df = new DecimalFormat(pattern, dfs); in assertCurrencyFormat()
/libcore/luni/src/main/java/libcore/icu/
DDecimalFormatData.java19 import android.icu.text.DecimalFormat;
76 DecimalFormat df = (DecimalFormat) NumberFormat.getInstance( in DecimalFormatData()
80 df = (DecimalFormat) NumberFormat.getInstance(locale, NumberFormat.CURRENCYSTYLE); in DecimalFormatData()
83 df = (DecimalFormat) NumberFormat.getInstance(locale, NumberFormat.PERCENTSTYLE); in DecimalFormatData()
/libcore/support/src/test/java/tests/support/
DSupport_DecimalFormat.java20 import java.text.DecimalFormat;
42 DecimalFormat format = (DecimalFormat) NumberFormat in t_format_with_FieldPosition()
73 format = new DecimalFormat("000000000.0#E0"); in t_format_with_FieldPosition()
102 format = (DecimalFormat) NumberFormat.getCurrencyInstance(new Locale( in t_format_with_FieldPosition()
164 DecimalFormat format = new DecimalFormat("###0.##\u2030"); in t_formatToCharacterIterator()
168 format = new DecimalFormat("00.0#E0"); in t_formatToCharacterIterator()
172 format = new DecimalFormat("0000.0#E0"); in t_formatToCharacterIterator()
/libcore/ojluni/src/main/java/java/text/
DDecimalFormat.java387 public class DecimalFormat extends NumberFormat { class
395 private transient android.icu.text.DecimalFormat icuDecimalFormat;
413 public DecimalFormat() { in DecimalFormat() method in DecimalFormat
454 public DecimalFormat(String pattern) { in DecimalFormat() method in DecimalFormat
484 public DecimalFormat (String pattern, DecimalFormatSymbols symbols) { in DecimalFormat() method in DecimalFormat
3279 DecimalFormat other = (DecimalFormat) super.clone(); in clone()
3280 other.icuDecimalFormat = (android.icu.text.DecimalFormat) icuDecimalFormat.clone(); in clone()
3338 if (!(obj instanceof DecimalFormat)) { in equals()
3341 DecimalFormat other = (DecimalFormat) obj; in equals()
3346 private boolean compareIcuRoundingIncrement(android.icu.text.DecimalFormat other) { in compareIcuRoundingIncrement()
DMessageFormat.java45 import java.text.DecimalFormat;
556 if (fmt instanceof DecimalFormat) { in toPattern()
557 result.append(",number,").append(((DecimalFormat)fmt).toPattern()); in toPattern()
1506 newFormat = new DecimalFormat(segments[SEG_MODIFIER], in makeFormat()
/libcore/luni/src/test/java/libcore/java/util/
DFormatterTest.java51 import java.text.DecimalFormat;
262 DecimalFormat decimalFormat = in testGroupingSizeZero()
263 (DecimalFormat) NumberFormat.getInstance(localeWithoutGrouping); in testGroupingSizeZero()

12