Searched refs:nf (Results 1 – 5 of 5) sorted by relevance
/libcore/luni/src/test/java/libcore/java/text/ |
D | NumberFormatTest.java | 41 NumberFormat nf = NumberFormat.getNumberInstance(Locale.US); in test_custom_Number_gets_longValue() local 42 assertEquals("123", nf.format(new MyNumber())); in test_custom_Number_gets_longValue() 61 NumberFormat nf = new MyNumberFormat(); in test_small_BigInteger_gets_longValue() local 62 assertEquals("long", nf.format(BigInteger.valueOf(Long.MAX_VALUE))); in test_small_BigInteger_gets_longValue() 63 assertEquals("double", nf.format(BigInteger.valueOf(Long.MAX_VALUE).add(BigInteger.ONE))); in test_small_BigInteger_gets_longValue() 64 assertEquals("long", nf.format(BigInteger.valueOf(Long.MIN_VALUE))); in test_small_BigInteger_gets_longValue() 65 … assertEquals("double", nf.format(BigInteger.valueOf(Long.MIN_VALUE).subtract(BigInteger.ONE))); in test_small_BigInteger_gets_longValue() 77 NumberFormat nf = NumberFormat.getNumberInstance(arabic); in test_numberLocalization() local 79 assertEquals("١٬٢٣٤٬٥٦٧٬٨٩٠", nf.format(1234567890)); in test_numberLocalization() 86 NumberFormat nf = NumberFormat.getPercentInstance(Locale.US); in test_10333() local [all …]
|
D | OldNumberFormatTest.java | 152 void parseObjectTest(NumberFormat nf, String sourseStr, ParsePosition position, in parseObjectTest() argument 155 Object result = nf.parseObject(sourseStr, position); in parseObjectTest()
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | ExpensiveObjectsBenchmark.java | 99 NumberFormat nf = NumberFormat.getInstance(Locale.US); in timeClonedNumberFormat() local 101 nf.clone(); in timeClonedNumberFormat() 106 NumberFormat nf = NumberFormat.getInstance(Locale.US); in timeNumberFormatTrivialFormatLong() local 108 nf.format(1024L); in timeNumberFormatTrivialFormatLong() 119 NumberFormat nf = NumberFormat.getInstance(Locale.US); in timeNumberFormatTrivialFormatDouble() local 121 nf.format(1024.0); in timeNumberFormatTrivialFormatDouble()
|
/libcore/luni/src/main/java/java/util/ |
D | Formatter.java | 2122 NativeDecimalFormat nf = getDecimalFormat(pattern); in transformE() local 2125 chars = nf.formatBigDecimal((BigDecimal) arg, null); in transformE() 2127 chars = nf.formatDouble(((Number) arg).doubleValue(), null); in transformE() 2230 NativeDecimalFormat nf = getDecimalFormat(pattern); 2232 result.append(nf.formatBigDecimal((BigDecimal) arg, null)); 2234 result.append(nf.formatDouble(((Number) arg).doubleValue(), null));
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
D | DecimalFormatTest.java | 1914 NumberFormat nf = NumberFormat.getInstance(Locale.FRANCE); in testSerializationHarmonyRICompatible() local 1917 if (!(nf instanceof DecimalFormat)) { in testSerializationHarmonyRICompatible() 1921 df = (DecimalFormat) nf; in testSerializationHarmonyRICompatible()
|