/external/icu/icu4j/eclipse-build/plugins.template/com.ibm.icu.base.tests/src/com/ibm/icu/tests/ |
D | NumberFormatTest.java | 25 NumberFormat nf = new NumberFormat(java.text.NumberFormat.getInstance()); in testNumberFormat() local 26 assertEquals(nf, NumberFormat.getInstance()); in testNumberFormat() 128 NumberFormat nf = NumberFormat.getInstance(); in testIsParseIntegerOnly() local 129 nf.setParseIntegerOnly(true); in testIsParseIntegerOnly() 130 assertTrue(nf.isParseIntegerOnly()); in testIsParseIntegerOnly() 131 nf.setParseIntegerOnly(false); in testIsParseIntegerOnly() 132 assertFalse(nf.isParseIntegerOnly()); in testIsParseIntegerOnly() 140 NumberFormat nf = NumberFormat.getInstance(); in testSetParseIntegerOnly() local 141 assertEquals(new Double(123.456), nf.parse(str)); in testSetParseIntegerOnly() 142 nf.setParseIntegerOnly(true); in testSetParseIntegerOnly() [all …]
|
/external/v8/test/intl/number-format/ |
D | check-minimum-fraction-digits.js | 7 var nf = new Intl.NumberFormat("en-us", { useGrouping: false, minimumFractionDigits: 4, maximumFrac… variable 9 assertEquals("12345.6789", nf.format(12345.6789)); 10 assertEquals("12345.678912", nf.format(12345.678912)); 11 assertEquals("12345.6700", nf.format(12345.67)); 12 assertEquals("12345.67891234", nf.format(12345.6789123421)); 14 nf = new Intl.NumberFormat("en-us", { useGrouping: false, minimumFractionDigits: 4, maximumFraction… variable 16 assertEquals("12345.6789%", nf.format(123.456789)); 17 assertEquals("12345.678912%", nf.format(123.45678912)); 18 assertEquals("12345.6700%", nf.format(123.4567)); 19 assertEquals("12345.67891234%", nf.format(123.456789123421)); [all …]
|
D | parse-decimal.js | 28 var nf = new Intl.NumberFormat(['en'], {style: 'decimal'}); variable 30 assertEquals(123.43, nf.v8Parse('123.43')); 31 assertEquals(123, nf.v8Parse('123')); 32 assertEquals(NaN, nf.v8Parse(NaN)); 33 assertEquals(12323, nf.v8Parse('123,23')); 34 assertEquals(12323.456, nf.v8Parse('123,23.456')); 35 assertEquals(12323.456, nf.v8Parse('0000000123,23.456')); 36 assertEquals(-12323.456, nf.v8Parse('-123,23.456')); 39 assertEquals(123.456, nf.v8Parse('123.456e-3'));
|
D | parse-percent.js | 28 var nf = new Intl.NumberFormat(['en'], {style: 'percent'}); variable 30 assertEquals(1.2343, nf.v8Parse('123.43%')); 31 assertEquals(1.23, nf.v8Parse('123%')); 32 assertEquals(NaN, nf.v8Parse(NaN)); 33 assertEquals(123.23, nf.v8Parse('123,23%')); 34 assertEquals(123.23456, nf.v8Parse('123,23.456%')); 35 assertEquals(123.23456, nf.v8Parse('0000000123,23.456%')); 36 assertEquals(-123.23456, nf.v8Parse('-123,23.456%'));
|
D | parse-invalid-input.js | 30 var nf = new Intl.NumberFormat(['en']); variable 32 assertEquals(undefined, nf.v8Parse('')); 33 assertEquals(undefined, nf.v8Parse('A')); 34 assertEquals(undefined, nf.v8Parse(new Date())); 35 assertEquals(undefined, nf.v8Parse(undefined)); 36 assertEquals(undefined, nf.v8Parse(null)); 37 assertEquals(undefined, nf.v8Parse()); 38 assertEquals(undefined, nf.v8Parse('Text before 12345'));
|
/external/v8/test/intl/general/ |
D | mapped-locale.js | 30 var nf = Intl.NumberFormat(['zh-TW'], {localeMatcher: 'lookup'}); variable 31 assertEquals('zh-TW', nf.resolvedOptions().locale); 33 var nf = Intl.NumberFormat(['zh-Hant-TW'], {localeMatcher: 'lookup'}); 34 assertEquals('zh-Hant-TW', nf.resolvedOptions().locale); 36 var nf = Intl.NumberFormat(['zh-Hant'], {localeMatcher: 'lookup'}); 37 assertEquals('zh-Hant', nf.resolvedOptions().locale); 39 nf = Intl.NumberFormat(['zh'], {localeMatcher: 'lookup'}); 40 assertEquals('zh', nf.resolvedOptions().locale); 42 nf = Intl.NumberFormat(['zh-CN'], {localeMatcher: 'lookup'}); 43 assertEquals('zh-CN', nf.resolvedOptions().locale); [all …]
|
/external/libnl/src/ |
D | nl-route-delete.c | 88 int nf = 0; in main() local 141 case 'd': nf++; nl_cli_route_parse_dst(route, optarg); break; in main() 142 case 'n': nf++; nl_cli_route_parse_nexthop(route, optarg, link_cache); break; in main() 143 case 't': nf++; nl_cli_route_parse_table(route, optarg); break; in main() 144 case ARG_FAMILY: nf++; nl_cli_route_parse_family(route, optarg); break; in main() 145 case ARG_SRC: nf++; nl_cli_route_parse_src(route, optarg); break; in main() 146 case ARG_IIF: nf++; nl_cli_route_parse_iif(route, optarg, link_cache); break; in main() 147 case ARG_PREF_SRC: nf++; nl_cli_route_parse_pref_src(route, optarg); break; in main() 148 case ARG_METRICS: nf++; nl_cli_route_parse_metric(route, optarg); break; in main() 149 case ARG_PRIORITY: nf++; nl_cli_route_parse_prio(route, optarg); break; in main() [all …]
|
D | Makefile.am | 10 nf-ct-list nf-log nf-queue nf-monitor \ 29 nf_ct_list_SOURCES = nf-ct-list.c 30 nf_ct_list_LDADD = -lnl-nf 31 nf_log_SOURCES = nf-log.c 32 nf_log_LDADD = -lnl-nf 33 nf_queue_SOURCES = nf-queue.c 34 nf_queue_LDADD = -lnl-nf 35 nf_monitor_SOURCES = nf-monitor.c 36 nf_monitor_LDADD = -lnl-nf
|
D | nl-cls-delete.c | 68 int nf = 0, err; in main() local 107 case 'd': nf++; parse_dev(cls, link_cache, optarg); break; in main() 108 case 'p': nf++; parse_parent(cls, optarg); break; in main() 109 case ARG_PRIO: nf++; parse_prio(cls, optarg); break; in main() 110 case ARG_ID: nf++; parse_handle(cls, optarg); break; in main() 111 case ARG_PROTO: nf++; parse_proto(cls, optarg); break; in main() 115 if (nf == 0 && !interactive && !default_yes) { in main()
|
/external/v8/test/intl/overrides/ |
D | number.js | 35 var nf = new Intl.NumberFormat(); variable 36 assertEquals(nf.format(integer), integer.toLocaleString()); 37 assertEquals(nf.format(float), float.toLocaleString()); 42 nf = new Intl.NumberFormat(locale); variable 43 assertEquals(nf.format(integer), integer.toLocaleString(locale)); 44 assertEquals(nf.format(float), float.toLocaleString(locale)); 51 nf = new Intl.NumberFormat(locale, options); variable 52 assertEquals(nf.format(integer), integer.toLocaleString(locale, options)); 53 assertEquals(nf.format(float), float.toLocaleString(locale, options));
|
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/ |
D | NumberFormatRegressionTest.java | 43 NumberFormat nf = NumberFormat.getInstance(Locale.US); in Test4161100() local 44 nf.setMinimumFractionDigits(1); in Test4161100() 45 nf.setMaximumFractionDigits(1); in Test4161100() 47 String s = nf.format(a); in Test4161100() 49 ((DecimalFormat) nf).toPattern() + " = " + s); in Test4161100() 71 NumberFormat nf = NumberFormat.getInstance(loc); in TestJ691() local 80 df.setNumberFormat(nf); in TestJ691() 317 void checkNBSPPatternRtNum(String testcase, NumberFormat nf, double myNumber) { in checkNBSPPatternRtNum() argument 318 String myString = nf.format(myNumber); in checkNBSPPatternRtNum() 322 aNumber = nf.parse(myString).doubleValue(); in checkNBSPPatternRtNum() [all …]
|
D | NumberRegression.java | 214 NumberFormat nf = NumberFormat.getInstance(); in Test4071492() local 215 nf.setMaximumFractionDigits(4); in Test4071492() 216 String out = nf.format(x); in Test4071492() 229 NumberFormat nf = NumberFormat.getInstance(Locale.FRANCE); in Test4086575() local 230 logln("nf toPattern1: " + ((DecimalFormat)nf).toPattern()); in Test4086575() 231 logln("nf toLocPattern1: " + ((DecimalFormat)nf).toLocalizedPattern()); in Test4086575() 235 ((DecimalFormat)nf).applyLocalizedPattern("###,00;(###,00)"); in Test4086575() 236 logln("nf toPattern2: " + ((DecimalFormat)nf).toPattern()); in Test4086575() 237 logln("nf toLocPattern2: " + ((DecimalFormat)nf).toLocalizedPattern()); in Test4086575() 239 logln("nf: " + nf.format(1234)); // 1234,00 in Test4086575() [all …]
|
D | NumberFormatTest.java | 1276 NumberFormat nf = NumberFormat.getCurrencyInstance(locs[i]); in TestCurrencyPatterns() local 1279 int min = nf.getMinimumFractionDigits(); in TestCurrencyPatterns() 1280 int max = nf.getMaximumFractionDigits(); in TestCurrencyPatterns() 1282 String a = nf.format(1.0); in TestCurrencyPatterns() 1283 String b = nf.format(1.125); in TestCurrencyPatterns() 1291 if (nf instanceof DecimalFormat) { in TestCurrencyPatterns() 1292 Currency curr = ((DecimalFormat) nf).getCurrency(); in TestCurrencyPatterns() 1295 String a = nf.format(1.0); in TestCurrencyPatterns() 1326 NumberFormat nf = NumberFormat.getInstance(); in TestRounding487() local 1327 roundingTest(nf, 0.00159999, 4, "0.0016"); in TestRounding487() [all …]
|
D | NumberFormatSpecificationTest.java | 39 NumberFormat nf = nfWithPattern("#,##0.##"); in TestNfSetters() local 40 nf.setMaximumIntegerDigits(5); in TestNfSetters() 41 nf.setMinimumIntegerDigits(4); in TestNfSetters() 42 assertEquals("", "34 567,89", format(1234567.89, nf)); in TestNfSetters() 43 assertEquals("", "0 034,56", format(34.56, nf)); in TestNfSetters() 158 private static String format(double d, NumberFormat nf) { in format() argument 159 return nf.format(d).replace('\u00a0', ' '); in format()
|
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/ |
D | NumberFormatRegressionTest.java | 47 NumberFormat nf = NumberFormat.getInstance(Locale.US); in Test4161100() local 48 nf.setMinimumFractionDigits(1); in Test4161100() 49 nf.setMaximumFractionDigits(1); in Test4161100() 51 String s = nf.format(a); in Test4161100() 53 ((DecimalFormat) nf).toPattern() + " = " + s); in Test4161100() 75 NumberFormat nf = NumberFormat.getInstance(loc); in TestJ691() local 84 df.setNumberFormat(nf); in TestJ691() 321 void checkNBSPPatternRtNum(String testcase, NumberFormat nf, double myNumber) { in checkNBSPPatternRtNum() argument 322 String myString = nf.format(myNumber); in checkNBSPPatternRtNum() 326 aNumber = nf.parse(myString).doubleValue(); in checkNBSPPatternRtNum() [all …]
|
D | NumberRegression.java | 218 NumberFormat nf = NumberFormat.getInstance(); in Test4071492() local 219 nf.setMaximumFractionDigits(4); in Test4071492() 220 String out = nf.format(x); in Test4071492() 233 NumberFormat nf = NumberFormat.getInstance(Locale.FRANCE); in Test4086575() local 234 logln("nf toPattern1: " + ((DecimalFormat)nf).toPattern()); in Test4086575() 235 logln("nf toLocPattern1: " + ((DecimalFormat)nf).toLocalizedPattern()); in Test4086575() 239 ((DecimalFormat)nf).applyLocalizedPattern("###,00;(###,00)"); in Test4086575() 240 logln("nf toPattern2: " + ((DecimalFormat)nf).toPattern()); in Test4086575() 241 logln("nf toLocPattern2: " + ((DecimalFormat)nf).toLocalizedPattern()); in Test4086575() 243 logln("nf: " + nf.format(1234)); // 1234,00 in Test4086575() [all …]
|
D | NumberFormatTest.java | 1280 NumberFormat nf = NumberFormat.getCurrencyInstance(locs[i]); in TestCurrencyPatterns() local 1283 int min = nf.getMinimumFractionDigits(); in TestCurrencyPatterns() 1284 int max = nf.getMaximumFractionDigits(); in TestCurrencyPatterns() 1286 String a = nf.format(1.0); in TestCurrencyPatterns() 1287 String b = nf.format(1.125); in TestCurrencyPatterns() 1295 if (nf instanceof DecimalFormat) { in TestCurrencyPatterns() 1296 Currency curr = ((DecimalFormat) nf).getCurrency(); in TestCurrencyPatterns() 1299 String a = nf.format(1.0); in TestCurrencyPatterns() 1330 NumberFormat nf = NumberFormat.getInstance(); in TestRounding487() local 1331 roundingTest(nf, 0.00159999, 4, "0.0016"); in TestRounding487() [all …]
|
D | NumberFormatSpecificationTest.java | 43 NumberFormat nf = nfWithPattern("#,##0.##"); in TestNfSetters() local 44 nf.setMaximumIntegerDigits(5); in TestNfSetters() 45 nf.setMinimumIntegerDigits(4); in TestNfSetters() 46 assertEquals("", "34 567,89", format(1234567.89, nf)); in TestNfSetters() 47 assertEquals("", "0 034,56", format(34.56, nf)); in TestNfSetters() 162 private static String format(double d, NumberFormat nf) { in format() argument 163 return nf.format(d).replace('\u00a0', ' '); in format()
|
/external/icu/icu4c/source/samples/numfmt/ |
D | main.cpp | 101 setNumberFormatCurrency_2_4(NumberFormat &nf, const char *currency, UErrorCode &errorCode) { in setNumberFormatCurrency_2_4() argument 114 DecimalFormat *dnf=dynamic_cast<DecimalFormat *>(&nf); in setNumberFormatCurrency_2_4() 167 nf.setMinimumFractionDigits(currencyMap[i].fractionDigits); in setNumberFormatCurrency_2_4() 168 nf.setMaximumFractionDigits(currencyMap[i].fractionDigits); in setNumberFormatCurrency_2_4() 190 setNumberFormatCurrency_2_6(NumberFormat &nf, const char *currency, UErrorCode &errorCode) { in setNumberFormatCurrency_2_6() argument 206 nf.setCurrency(uCurrency); in setNumberFormatCurrency_2_6() 208 nf.setCurrency(uCurrency, errorCode); in setNumberFormatCurrency_2_6() 226 NumberFormat *nf; in showCurrencyFormatting() local 243 nf=NumberFormat::createCurrencyInstance(sampleLocaleIDs[i], errorCode); in showCurrencyFormatting() 255 setNumberFormatCurrency_2_6(*nf, sampleCurrencies[j], errorCode); in showCurrencyFormatting() [all …]
|
/external/icu/icu4j/main/tests/localespi/src/com/ibm/icu/dev/test/localespi/ |
D | NumberFormatTest.java | 47 NumberFormat nf; in checkGetInstance() local 49 nf = getJDKInstance(type, loc, method); in checkGetInstance() 51 boolean isIcuImpl = (nf instanceof com.ibm.icu.impl.jdkadapter.DecimalFormatICU) in checkGetInstance() 52 || (nf instanceof com.ibm.icu.impl.jdkadapter.NumberFormatICU); in checkGetInstance() 65 if (!nf.equals(nfIcu)) { in checkGetInstance() 79 NumberFormat nf = null; in getJDKInstance() local 84 nf = NumberFormat.getInstance(loc); in getJDKInstance() 88 nf = NumberFormat.getNumberInstance(loc); in getJDKInstance() 92 nf = NumberFormat.getIntegerInstance(loc); in getJDKInstance() 96 nf = NumberFormat.getPercentInstance(loc); in getJDKInstance() [all …]
|
/external/icu/icu4c/source/i18n/ |
D | unum.cpp | 153 const NumberFormat* nf = reinterpret_cast<const NumberFormat*>(fmt); in unum_clone() local 154 const DecimalFormat* df = dynamic_cast<const DecimalFormat*>(nf); in unum_clone() 158 const RuleBasedNumberFormat* rbnf = dynamic_cast<const RuleBasedNumberFormat*>(nf); in unum_clone() 481 const NumberFormat* nf = reinterpret_cast<const NumberFormat*>(fmt); in unum_getAttribute() local 484 return nf->isLenient(); in unum_getAttribute() 488 const DecimalFormat* df = dynamic_cast<const DecimalFormat*>(nf); in unum_getAttribute() 502 NumberFormat* nf = reinterpret_cast<NumberFormat*>(fmt); in unum_setAttribute() local 506 return nf->setLenient(newValue != 0); in unum_setAttribute() 509 DecimalFormat* df = dynamic_cast<DecimalFormat*>(nf); in unum_setAttribute() 520 const NumberFormat* nf = reinterpret_cast<const NumberFormat*>(fmt); in unum_getDoubleAttribute() local [all …]
|
/external/valgrind/VEX/priv/ |
D | guest_arm64_helpers.c | 121 ULong nf = (cc_dep1 >> ARM64G_CC_SHIFT_N) & 1; in arm64g_calculate_flag_n() local 122 return nf; in arm64g_calculate_flag_n() 129 ULong nf = (ULong)(res >> 31); in arm64g_calculate_flag_n() local 130 return nf; in arm64g_calculate_flag_n() 137 ULong nf = (ULong)(res >> 63); in arm64g_calculate_flag_n() local 138 return nf; in arm64g_calculate_flag_n() 145 ULong nf = (ULong)(res >> 31); in arm64g_calculate_flag_n() local 146 return nf; in arm64g_calculate_flag_n() 153 ULong nf = res >> 63; in arm64g_calculate_flag_n() local 154 return nf; in arm64g_calculate_flag_n() [all …]
|
/external/icu/icu4c/source/test/intltest/ |
D | numrgts.cpp | 484 NumberFormat *nf = NumberFormat::createInstance(status); in Test4071492() local 486 delete nf; in Test4071492() 489 nf->setMaximumFractionDigits(4); in Test4071492() 492 out = nf->format(x, out, pos); in Test4071492() 498 delete nf; in Test4071492() 520 DecimalFormat *nf = dynamic_cast<DecimalFormat *>(nf1); in Test4086575() local 521 if(nf == NULL) { in Test4086575() 527 logln("nf toPattern1: " + nf->toPattern(temp)); in Test4086575() 528 logln("nf toLocPattern1: " + nf->toLocalizedPattern(temp)); in Test4086575() 532 nf->applyLocalizedPattern(UnicodeString("###,00;(###,00)"), status); in Test4086575() [all …]
|
/external/icu/icu4j/main/tests/framework/src/com/ibm/icu/dev/util/ |
D | Timer.java | 58 return nf; in getNumberFormat() 66 return nf.format(getDuration()) + "\tns"; in toString() 72 return nf.format(getDuration()/iterations) + "\tns"; in toString() 76 …return nf.format(getDuration()/iterations) + "\tns\t" + pf.format((double)getDuration()/other - 1D… in toString() 79 private DecimalFormat nf = (DecimalFormat) NumberFormat.getNumberInstance(ULocale.ENGLISH); field in Timer
|
/external/icu/android_icu4j/src/main/tests/android/icu/dev/util/ |
D | Timer.java | 59 return nf; in getNumberFormat() 67 return nf.format(getDuration()) + "\tns"; in toString() 73 return nf.format(getDuration()/iterations) + "\tns"; in toString() 77 …return nf.format(getDuration()/iterations) + "\tns\t" + pf.format((double)getDuration()/other - 1D… in toString() 80 private DecimalFormat nf = (DecimalFormat) NumberFormat.getNumberInstance(ULocale.ENGLISH); field in Timer
|