Home
last modified time | relevance | path

Searched refs:nf (Results 1 – 7 of 7) sorted by relevance

/libcore/luni/src/test/java/libcore/java/text/
DNumberFormatTest.java42 NumberFormat nf = NumberFormat.getNumberInstance(Locale.US); in test_custom_Number_gets_longValue() local
43 assertEquals("123", nf.format(new MyNumber())); in test_custom_Number_gets_longValue()
62 NumberFormat nf = new MyNumberFormat(); in test_small_BigInteger_gets_longValue() local
63 assertEquals("long", nf.format(BigInteger.valueOf(Long.MAX_VALUE))); in test_small_BigInteger_gets_longValue()
64 assertEquals("double", nf.format(BigInteger.valueOf(Long.MAX_VALUE).add(BigInteger.ONE))); in test_small_BigInteger_gets_longValue()
65 assertEquals("long", nf.format(BigInteger.valueOf(Long.MIN_VALUE))); in test_small_BigInteger_gets_longValue()
66 … assertEquals("double", nf.format(BigInteger.valueOf(Long.MIN_VALUE).subtract(BigInteger.ONE))); in test_small_BigInteger_gets_longValue()
82 NumberFormat nf = NumberFormat.getNumberInstance(arabic); in test_numberLocalization() local
84 assertEquals("١٬٢٣٤٬٥٦٧٬٨٩٠", nf.format(1234567890)); in test_numberLocalization()
91 NumberFormat nf = NumberFormat.getPercentInstance(Locale.US); in test_10333() local
[all …]
DOldNumberFormatTest.java159 void parseObjectTest(NumberFormat nf, String sourseStr, ParsePosition position, in parseObjectTest() argument
162 Object result = nf.parseObject(sourseStr, position); in parseObjectTest()
/libcore/ojluni/src/test/java/text/Format/NumberFormat/
DBigDecimalFormat.java109 NumberFormat nf = NumberFormat.getInstance(Locale.US); in test_Format_in_NumberFormat_BigDecimal() local
110 ((DecimalFormat)nf).applyPattern("#,##0.###"); in test_Format_in_NumberFormat_BigDecimal()
111 setDigits(nf, Integer.MAX_VALUE, 1, Integer.MAX_VALUE, 0); in test_Format_in_NumberFormat_BigDecimal()
117 nf.format(new BigDecimal(from), formatted, new FieldPosition(0)); in test_Format_in_NumberFormat_BigDecimal()
118 checkFormat(from, formatted, from, ((DecimalFormat)nf).getMultiplier()); in test_Format_in_NumberFormat_BigDecimal()
128 nf.format(new BigDecimal(from), formatted, fp); in test_Format_in_NumberFormat_BigDecimal()
129 checkFormat(from, formatted, from, ((DecimalFormat)nf).getMultiplier()); in test_Format_in_NumberFormat_BigDecimal()
141 nf.format(new BigDecimal(from), formatted, fp); in test_Format_in_NumberFormat_BigDecimal()
142 checkFormat(from, formatted, to, ((DecimalFormat)nf).getMultiplier()); in test_Format_in_NumberFormat_BigDecimal()
154 nf.format(new BigDecimal(from), formatted, fp); in test_Format_in_NumberFormat_BigDecimal()
[all …]
/libcore/ojluni/src/test/java/text/Format/DecimalFormat/
DBug8165466.java40 DecimalFormat nf = (DecimalFormat) DecimalFormat in main() local
42 nf.setMaximumFractionDigits(3); in main()
43 nf.setMinimumFractionDigits(0); in main()
44 nf.setMultiplier(1); in main()
47 String result = nf.format(d); in main()
55 result = nf.format(d); in main()
63 result = nf.format(d); in main()
72 result = nf.format(d); in main()
80 result = nf.format(d); in main()
88 result = nf.format(d); in main()
/libcore/benchmarks/src/benchmarks/regression/
DExpensiveObjectsBenchmark.java101 NumberFormat nf = NumberFormat.getInstance(Locale.US); in timeClonedNumberFormat() local
103 nf.clone(); in timeClonedNumberFormat()
108 NumberFormat nf = NumberFormat.getInstance(Locale.US); in timeNumberFormatTrivialFormatLong() local
110 nf.format(1024L); in timeNumberFormatTrivialFormatLong()
121 NumberFormat nf = NumberFormat.getInstance(Locale.US); in timeNumberFormatTrivialFormatDouble() local
123 nf.format(1024.0); in timeNumberFormatTrivialFormatDouble()
/libcore/ojluni/src/main/java/java/util/
DScanner.java1284 NumberFormat nf = NumberFormat.getNumberInstance(locale); in useLocale() local
1307 df = (DecimalFormat) nf; in useLocale()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DDecimalFormatTest.java1950 NumberFormat nf = NumberFormat.getInstance(Locale.FRANCE); in testSerializationHarmonyRICompatible() local
1953 if (!(nf instanceof DecimalFormat)) { in testSerializationHarmonyRICompatible()
1957 df = (DecimalFormat) nf; in testSerializationHarmonyRICompatible()