Lines Matching refs:DecimalFormat

222         DecimalFormat fmt(pat[i], sym, status);
223 if (U_FAILURE(status)) { errln((UnicodeString)"FAIL: DecimalFormat constructor failed for " + pat[i]); continue; }
357 DecimalFormat fmt(pat[p], sym, status);
358 if (U_FAILURE(status)) { errln("FAIL: Bad status returned by DecimalFormat ct"); continue; }
448 DecimalFormat* fmt = (DecimalFormat*)NumberFormat::createCurrencyInstance("en_US", status);
464 DecimalFormat fmt("##0.00E0",status);
499 DecimalFormat fmt("#.#E0",status);
591 DecimalFormat *fmt = new DecimalFormat(*pat, *sym, status);
604 fmt = new DecimalFormat(*pat, *sym, status);
633 DecimalFormat *fmt = new DecimalFormat(pat, *sym, status);
650 fmt = new DecimalFormat(pat, *sym, status);
837 DecimalFormat* format = new DecimalFormat("00", status);
925 DecimalFormat *format = new DecimalFormat("(#,##0)", status);
929 dataerrln("Unable to create DecimalFormat (#,##0) - %s", u_errorName(status));
1134 DecimalFormat f("#,##,###", US, status);
1135 CHECK(status, "DecimalFormat ct");
1191 DecimalFormat fmt("a b#0c ", US, ec);
1242 DecimalFormat fmt1(UnicodeString("0.###E0"), US, status);
1243 CHECK(status, "DecimalFormat(0.###E0)");
1244 DecimalFormat fmt2(UnicodeString("0.###E+0"), US, status);
1245 CHECK(status, "DecimalFormat(0.###E+0)");
1274 DecimalFormat df(pat, US, status);
1275 CHECK(status, "DecimalFormat constructor");
1317 expect2(new DecimalFormat("#E0", US, status),
1320 expect(new DecimalFormat("0E0", US, status),
1326 expect(new DecimalFormat("##0.###E0", US, status),
1329 expect(new DecimalFormat("##0.###E0", US, status),
1332 expect2(new DecimalFormat("##0.####E0", US, status),
1338 expect(new DecimalFormat("##0.####E0", US, status),
1341 expect2(new DecimalFormat("##0.####E0", US, status),
1344 expect(new DecimalFormat(".###E0", US, status),
1347 expect2(new DecimalFormat(".###E0", US, status),
1351 expect(new DecimalFormat[] { new DecimalFormat("#E0", US),
1352 new DecimalFormat("##E0", US),
1353 new DecimalFormat("####E0", US),
1354 new DecimalFormat("0E0", US),
1355 new DecimalFormat("00E0", US),
1356 new DecimalFormat("000E0", US),
1371 expect2(new DecimalFormat("#E0", US, status),
1373 expect2(new DecimalFormat("##E0", US, status),
1375 expect2(new DecimalFormat("####E0", US, status),
1377 expect(new DecimalFormat("0E0", US, status),
1379 expect(new DecimalFormat("00E0", US, status),
1381 expect(new DecimalFormat("000E0", US, status),
1384 expect(new DecimalFormat("###E0", US, status),
1399 expect2(new DecimalFormat("###E0", US, status),
1401 expect2(new DecimalFormat("###E0", US, status),
1403 expect2(new DecimalFormat("###E0", US, status),
1405 expect2(new DecimalFormat("###E0", US, status),
1407 expect2(new DecimalFormat("###E0", US, status),
1409 expect2(new DecimalFormat("###E0", US, status),
1411 expect2(new DecimalFormat("###E0", US, status),
1413 expect2(new DecimalFormat("###E0", US, status),
1415 expect2(new DecimalFormat("###E0", US, status),
1418 expect(new DecimalFormat("0.#E+00", US, status),
1426 expect2(new DecimalFormat("0.#E+00", US, status),
1428 expect2(new DecimalFormat("0.#E+00", US, status),
1440 expect2(new DecimalFormat("*^##.##", US, status),
1442 expect2(new DecimalFormat("*^##.##", US, status),
1444 expect2(new DecimalFormat("##0.0####E0*_ 'g-m/s^2'", US, status),
1446 expect(new DecimalFormat("##0.0####E0*_ 'g-m/s^2'", US, status),
1448 expect2(new DecimalFormat("##0.0####*_ 'g-m/s^2'", US, status),
1450 expect(new DecimalFormat("##0.0####*_ 'g-m/s^2'", US, status),
1455 expect2(new DecimalFormat(formatStr, US, status),
1457 expect2(new DecimalFormat(formatStr, US, status),
1459 expect2(new DecimalFormat(formatStr, US, status),
1461 expect2(new DecimalFormat(formatStr, US, status),
1463 expect2(new DecimalFormat(formatStr, US, status),
1465 expect2(new DecimalFormat(formatStr, US, status),
1467 expect2(new DecimalFormat(formatStr, US, status),
1469 expect2(new DecimalFormat(formatStr, US, status),
1472 expect2(new DecimalFormat(formatStr, US, status),
1474 expect2(new DecimalFormat(formatStr, US, status),
1476 expect2(new DecimalFormat(formatStr, US, status),
1478 expect2(new DecimalFormat(formatStr, US, status),
1480 expect2(new DecimalFormat(formatStr, US, status),
1482 expect2(new DecimalFormat(formatStr, US, status),
1484 expect2(new DecimalFormat(formatStr, US, status),
1486 expect2(new DecimalFormat(formatStr, US, status),
1492 expect2(new DecimalFormat(formatStr2, US, status),
1494 expect2(new DecimalFormat(formatStr2, US, status),
1496 expect2(new DecimalFormat(formatStr2, US, status),
1498 expect2(new DecimalFormat(formatStr2, US, status),
1500 expect2(new DecimalFormat(formatStr2, US, status),
1502 expect2(new DecimalFormat(formatStr2, US, status),
1504 expect2(new DecimalFormat(formatStr2, US, status),
1506 expect2(new DecimalFormat(formatStr2, US, status),
1509 expect2(new DecimalFormat(formatStr2, US, status),
1511 expect2(new DecimalFormat(formatStr2, US, status),
1513 expect2(new DecimalFormat(formatStr2, US, status),
1515 expect2(new DecimalFormat(formatStr2, US, status),
1517 expect2(new DecimalFormat(formatStr2, US, status),
1519 expect2(new DecimalFormat(formatStr2, US, status),
1521 expect2(new DecimalFormat(formatStr2, US, status),
1523 expect2(new DecimalFormat(formatStr2, US, status),
1527 DecimalFormat fmt("#", US, status);
1528 CHECK(status, "DecimalFormat constructor");
1531 expectPad(fmt, "*P##.##", DecimalFormat::kPadBeforePrefix, 5, padString);
1533 expectPad(fmt, "*^#", DecimalFormat::kPadBeforePrefix, 1, (UnicodeString)"^");
1536 expectPad(fmt, "*^^^#", DecimalFormat::kPadBeforePrefix, 3, (UnicodeString)"^^^");
1543 expectPad(fmt, pattern , DecimalFormat::kPadBeforePrefix, 4, padString);
1556 DecimalFormat fmt("#", US, status);
1557 CHECK(status, "DecimalFormat constructor");
1561 expectPad(fmt, "*^#", DecimalFormat::kPadBeforePrefix, 1, hat);
1562 expectPad(fmt, "$*^#", DecimalFormat::kPadAfterPrefix, 2, hat);
1563 expectPad(fmt, "#*^", DecimalFormat::kPadBeforeSuffix, 1, hat);
1564 expectPad(fmt, "#$*^", DecimalFormat::kPadAfterSuffix, 2, hat);
1567 expectPad(fmt, "'pre'#,##0*x'post'", DecimalFormat::kPadBeforeSuffix,
1569 expectPad(fmt, "''#0*x", DecimalFormat::kPadBeforeSuffix,
1571 expectPad(fmt, "'I''ll'*a###.##", DecimalFormat::kPadAfterPrefix,
1580 fmt.setPadPosition(DecimalFormat::kPadBeforePrefix);
1583 fmt.setPadPosition(DecimalFormat::kPadBeforeSuffix);
1586 fmt.setPadPosition(DecimalFormat::kPadAfterSuffix);
1592 fmt.setPadPosition(DecimalFormat::kPadAfterPrefix);
1626 expect2(new DecimalFormat(patternStr, custom, status),
1630 expect2(new DecimalFormat("*^##.##", custom, status),
1633 expect2(new DecimalFormat("##.##", custom, status),
1636 expect2(new DecimalFormat("##0.0####E0 'g-m/s^2'", custom, status),
1639 expect(new DecimalFormat("##0.0####E0 'g-m/s^2'", custom, status),
1642 expect2(new DecimalFormat("##0.0#### 'g-m/s^2'", custom, status),
1645 expect(new DecimalFormat("##0.0#### 'g-m/s^2'", custom, status),
1659 expect2(new DecimalFormat("##0.000", custom, status),
1669 expect2(new DecimalFormat(patternStr, custom, status),
1677 expect2(new DecimalFormat(patternStr, custom, status),
1705 DecimalFormat* df = dynamic_cast<DecimalFormat*>(nf);
1972 DecimalFormat fmt(pat, sym, ec);
1974 errln("Fail: DecimalFormat constructor");
2009 DecimalFormat fmt2(pat, sym, ec);
2011 errln("Fail: DecimalFormat constructor");
2035 DecimalFormat fmt(ctou("###.###\\u2030"), ec);
2036 if (!assertSuccess("DecimalFormat ct", ec)) return;
2042 DecimalFormat fmt2("", sym, ec);
2068 DecimalFormat fmt(pat, ec); // locale doesn't matter here
2138 DecimalFormat *ref = 0, *fmt = 0;
2155 ref = new DecimalFormat(tok,
2158 dataerrln("Error constructing DecimalFormat");
2175 fmt = new DecimalFormat(pat, new DecimalFormatSymbols(loc, ec), ec);
2287 DecimalFormat* f = 0;
2292 f = new DecimalFormat(testpat, ec2);
2398 ((DecimalFormat*) &fmt)->toPattern(pat);
2471 ((DecimalFormat*) &fmt)->toPattern(pat);
2515 DecimalFormat& fmt = * (DecimalFormat*) &nf;
2523 assertSuccess("DecimalFormat::setCurrency", ec);
2553 void NumberFormatTest::expectPat(DecimalFormat& fmt, const UnicodeString& exp) {
2563 void NumberFormatTest::expectPad(DecimalFormat& fmt, const UnicodeString& pat,
2567 void NumberFormatTest::expectPad(DecimalFormat& fmt, const UnicodeString& pat,
2571 void NumberFormatTest::expectPad(DecimalFormat& fmt, const UnicodeString& pat,
2752 DecimalFormat *df = (DecimalFormat*)NumberFormat::createCurrencyInstance(Locale::getEnglish(), status);
2763 for (int mode=DecimalFormat::kRoundUp;mode<DecimalFormat::kRoundHalfEven;mode++) {
2764 df->setRoundingMode((DecimalFormat::ERoundingMode)mode);
2777 void NumberFormatTest::checkRounding(DecimalFormat* df, double base, int iterations, double increment) {
2793 double NumberFormatTest::checkRound(DecimalFormat* df, double iValue, double lastParsed) {
2823 DecimalFormat df(UnicodeString("0"), US, status);
2824 CHECK(status, "DecimalFormat(0)");
2831 errln("DecimalFormat.setMultiplier(0) did not ignore its zero input");
2838 errln("DecimalFormat.setMultiplier(-1) ignored its negative input");
2876 // TODO: uncomment (and fix up) once BigDecimal is ported and DecimalFormat can handle it
3076 DecimalFormat* fmt = new DecimalFormat(pat, new DecimalFormatSymbols(*sym), status);
3078 errln("FAILED init DecimalFormat ");
3178 DecimalFormat* fmt = new DecimalFormat(pat, sym, status);
3181 errln("failed to new DecimalFormat in TestDecimalFormatCurrencyParse");
6079 DecimalFormat *decFmt = (DecimalFormat *) NumberFormat::createInstance(status);
6109 DecimalFormat *decFmt = (DecimalFormat *) NumberFormat::createInstance(locale, UNUM_CURRENCY, status);
6142 decFmt = (DecimalFormat *) NumberFormat::createInstance(locale, UNUM_SCIENTIFIC, status);
6392 DecimalFormat fmt("#####", symbols, status);
6394 errln((UnicodeString)"ERROR: Could not create DecimalFormat (pattern, symbols*)");