Home | History | Annotate | Download | only in intltest

Lines Matching refs:DecimalFormat

230         DecimalFormat fmt(pat[i], sym, status);
231 if (U_FAILURE(status)) { errln((UnicodeString)"FAIL: DecimalFormat constructor failed for " + pat[i]); continue; }
365 DecimalFormat fmt(pat[p], sym, status);
366 if (U_FAILURE(status)) { errln("FAIL: Bad status returned by DecimalFormat ct"); continue; }
456 DecimalFormat* fmt = (DecimalFormat*)NumberFormat::createCurrencyInstance("en_US", status);
472 DecimalFormat fmt("##0.00E0",status);
507 DecimalFormat fmt("#.#E0",status);
599 DecimalFormat *fmt = new DecimalFormat(*pat, *sym, status);
612 fmt = new DecimalFormat(*pat, *sym, status);
641 DecimalFormat *fmt = new DecimalFormat(pat, *sym, status);
658 fmt = new DecimalFormat(pat, *sym, status);
845 DecimalFormat* format = new DecimalFormat("00", status);
933 DecimalFormat *format = new DecimalFormat("(#,##0)", status);
937 dataerrln("Unable to create DecimalFormat (#,##0) - %s", u_errorName(status));
1142 DecimalFormat f("#,##,###", US, status);
1143 CHECK(status, "DecimalFormat ct");
1199 DecimalFormat fmt("a b#0c ", US, ec);
1250 DecimalFormat fmt1(UnicodeString("0.###E0"), US, status);
1251 CHECK(status, "DecimalFormat(0.###E0)");
1252 DecimalFormat fmt2(UnicodeString("0.###E+0"), US, status);
1253 CHECK(status, "DecimalFormat(0.###E+0)");
1282 DecimalFormat df(pat, US, status);
1283 CHECK(status, "DecimalFormat constructor");
1325 expect2(new DecimalFormat("#E0", US, status),
1328 expect(new DecimalFormat("0E0", US, status),
1334 expect(new DecimalFormat("##0.###E0", US, status),
1337 expect(new DecimalFormat("##0.###E0", US, status),
1340 expect2(new DecimalFormat("##0.####E0", US, status),
1346 expect(new DecimalFormat("##0.####E0", US, status),
1349 expect2(new DecimalFormat("##0.####E0", US, status),
1352 expect(new DecimalFormat(".###E0", US, status),
1355 expect2(new DecimalFormat(".###E0", US, status),
1359 expect(new DecimalFormat[] { new DecimalFormat("#E0", US),
1360 new DecimalFormat("##E0", US),
1361 new DecimalFormat("####E0", US),
1362 new DecimalFormat("0E0", US),
1363 new DecimalFormat("00E0", US),
1364 new DecimalFormat("000E0", US),
1379 expect2(new DecimalFormat("#E0", US, status),
1381 expect2(new DecimalFormat("##E0", US, status),
1383 expect2(new DecimalFormat("####E0", US, status),
1385 expect(new DecimalFormat("0E0", US, status),
1387 expect(new DecimalFormat("00E0", US, status),
1389 expect(new DecimalFormat("000E0", US, status),
1392 expect(new DecimalFormat("###E0", US, status),
1407 expect2(new DecimalFormat("###E0", US, status),
1409 expect2(new DecimalFormat("###E0", US, status),
1411 expect2(new DecimalFormat
1413 expect2(new DecimalFormat("###E0", US, status),
1415 expect2(new DecimalFormat("###E0", US, status),
1417 expect2(new DecimalFormat("###E0", US, status),
1419 expect2(new DecimalFormat("###E0", US, status),
1421 expect2(new DecimalFormat("###E0", US, status),
1423 expect2(new DecimalFormat("###E0", US, status),
1426 expect(new DecimalFormat("0.#E+00", US, status),
1434 expect2(new DecimalFormat("0.#E+00", US, status),
1436 expect2(new DecimalFormat("0.#E+00", US, status),
1448 expect2(new DecimalFormat("*^##.##", US, status),
1450 expect2(new DecimalFormat("*^##.##", US, status),
1452 expect2(new DecimalFormat("##0.0####E0*_ 'g-m/s^2'", US, status),
1454 expect(new DecimalFormat("##0.0####E0*_ 'g-m/s^2'", US, status),
1456 expect2(new DecimalFormat("##0.0####*_ 'g-m/s^2'", US, status),
1458 expect(new DecimalFormat("##0.0####*_ 'g-m/s^2'", 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),
1471 expect2(new DecimalFormat(formatStr, US, status),
1473 expect2(new DecimalFormat(formatStr, US, status),
1475 expect2(new DecimalFormat(formatStr, US, status),
1477 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),
1488 expect2(new DecimalFormat(formatStr, US, status),
1490 expect2(new DecimalFormat(formatStr, US, status),
1492 expect2(new DecimalFormat(formatStr, US, status),
1494 expect2(new DecimalFormat(formatStr, 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),
1508 expect2(new DecimalFormat(formatStr2, US, status),
1510 expect2(new DecimalFormat(formatStr2, US, status),
1512 expect2(new DecimalFormat(formatStr2, US, status),
1514 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),
1525 expect2(new DecimalFormat(formatStr2, US, status),
1527 expect2(new DecimalFormat(formatStr2, US, status),
1529 expect2(new DecimalFormat(formatStr2, US, status),
1531 expect2(new DecimalFormat(formatStr2, US, status),
1535 DecimalFormat fmt("#", US, status);
1536 CHECK(status, "DecimalFormat constructor");
1539 expectPad(fmt, "*P##.##", DecimalFormat::kPadBeforePrefix, 5, padString);
1541 expectPad(fmt, "*^#", DecimalFormat::kPadBeforePrefix, 1, (UnicodeString)"^");
1544 expectPad(fmt, "*^^^#", DecimalFormat::kPadBeforePrefix, 3, (UnicodeString)"^^^");
1551 expectPad(fmt, pattern , DecimalFormat::kPadBeforePrefix, 4, padString);
1564 DecimalFormat fmt("#", US, status);
1565 CHECK(status, "DecimalFormat constructor");
1569 expectPad(fmt, "*^#", DecimalFormat::kPadBeforePrefix, 1, hat);
1570 expectPad(fmt, "$*^#", DecimalFormat::kPadAfterPrefix, 2, hat);
1571 expectPad(fmt, "#*^", DecimalFormat::kPadBeforeSuffix, 1, hat);
1572 expectPad(fmt, "#$*^", DecimalFormat::kPadAfterSuffix, 2, hat);
1575 expectPad(fmt, "'pre'#,##0*x'post'", DecimalFormat::kPadBeforeSuffix,
1577 expectPad(fmt, "''#0*x", DecimalFormat::kPadBeforeSuffix,
1579 expectPad(fmt, "'I''ll'*a###.##", DecimalFormat::kPadAfterPrefix,
1588 fmt.setPadPosition(DecimalFormat::kPadBeforePrefix);
1591 fmt.setPadPosition(DecimalFormat::kPadBeforeSuffix);
1594 fmt.setPadPosition(DecimalFormat::kPadAfterSuffix);
1600 fmt.setPadPosition(DecimalFormat::kPadAfterPrefix);
1634 expect2(new DecimalFormat(patternStr, custom, status),
1638 expect2(new DecimalFormat("*^##.##", custom, status),
1641 expect2(new DecimalFormat("##.##", custom, status),
1644 expect2(new DecimalFormat("##0.0####E0 'g-m/s^2'", custom, status),
1647 expect(new DecimalFormat("##0.0####E0 'g-m/s^2'", custom, status),
1650 expect2(new DecimalFormat("##0.0#### 'g-m/s^2'", custom, status),
1653 expect(new DecimalFormat("##0.0#### 'g-m/s^2'", custom, status),
1667 expect2(new DecimalFormat("##0.000", custom, status),
1677 expect2(new DecimalFormat(patternStr, custom, status),
1685 expect2(new DecimalFormat(patternStr, custom, status),
1713 DecimalFormat* df = dynamic_cast<DecimalFormat*>(nf);
1992 DecimalFormat fmt(pat, sym, ec);
1994 errln("Fail: DecimalFormat constructor");
2029 DecimalFormat fmt2(pat, sym, ec);
2031 errln("Fail: DecimalFormat constructor");
2055 DecimalFormat fmt(ctou("###.###\\u2030"), ec);
2056 if (!assertSuccess("DecimalFormat ct", ec)) return;
2062 DecimalFormat fmt2("", sym, ec);
2088 DecimalFormat fmt(pat, ec); // locale doesn't matter here
2158 DecimalFormat *ref = 0, *fmt = 0;
2175 ref = new DecimalFormat(tok,
2178 dataerrln("Error constructing DecimalFormat");
2195 fmt = new DecimalFormat(pat, new DecimalFormatSymbols(loc, ec), ec);
2307 DecimalFormat* f = 0;
2312 f = new DecimalFormat(testpat, ec2);
2418 ((DecimalFormat*) &fmt)->toPattern(pat);
2491 ((DecimalFormat*) &fmt)->toPattern(pat);
2535 DecimalFormat& fmt = * (DecimalFormat*) &nf;
2543 assertSuccess("DecimalFormat::setCurrency", ec);
2573 void NumberFormatTest::expectPat(DecimalFormat& fmt, const UnicodeString& exp) {
2583 void NumberFormatTest::expectPad(DecimalFormat& fmt, const UnicodeString& pat,
2587 void NumberFormatTest::expectPad(DecimalFormat& fmt, const UnicodeString& pat,
2591 void NumberFormatTest::expectPad(DecimalFormat& fmt, const UnicodeString& pat,
2772 DecimalFormat *df = (DecimalFormat*)NumberFormat::createCurrencyInstance(Locale::getEnglish(), status);
2783 for (int mode=DecimalFormat::kRoundUp;mode<DecimalFormat::kRoundHalfEven;mode++) {
2784 df->setRoundingMode((DecimalFormat::ERoundingMode)mode);
2810 DecimalFormat *df = (DecimalFormat*)NumberFormat::createCurrencyInstance(Locale::getEnglish(), status);
2834 void NumberFormatTest::checkRounding(DecimalFormat* df, double base, int iterations, double increment) {
2850 double NumberFormatTest::checkRound(DecimalFormat* df, double iValue, double lastParsed) {
2880 DecimalFormat df(UnicodeString("0"), US, status);
2881 CHECK(status, "DecimalFormat(0)");
2888 errln("DecimalFormat.setMultiplier(0) did not ignore its zero input");
2895 errln("DecimalFormat.setMultiplier(-1) ignored its negative input");
2933 // TODO: uncomment (and fix up) once BigDecimal is ported and DecimalFormat can handle it
3131 DecimalFormat* fmt = new DecimalFormat(pat, new DecimalFormatSymbols(*sym), status);
3133 errln("FAILED init DecimalFormat ");
3233 DecimalFormat* fmt = new DecimalFormat(pat, sym, status);
3236 errln("failed to new DecimalFormat in TestDecimalFormatCurrencyParse");
6132 DecimalFormat *decFmt = (DecimalFormat *) NumberFormat::createInstance(status);
6162 DecimalFormat *decFmt = (DecimalFormat *) NumberFormat::createInstance(locale, UNUM_CURRENCY, status);
6195 decFmt = (DecimalFormat *) NumberFormat::createInstance(locale, UNUM_SCIENTIFIC, status);
6451 DecimalFormat fmt("#####", symbols, status);
6453 errln((UnicodeString)"ERROR: Could not create DecimalFormat (pattern, symbols*)");
6589 logln("Sizeof DecimalFormat = %d, Sizeof DecimalFormatInternal=%d, UNUM_DECIMALFORMAT_INTERNAL_SIZE=%d\n",
6590 sizeof(DecimalFormat), sizeof(DecimalFormatInternal), UNUM_DECIMALFORMAT_INTERNAL_SIZE);
6594 infoln("Note: sizeof(DecimalFormatInternal)=%d but UNUM_DECIMALFORMAT_INTERNAL_SIZE is %d. Decrease the #define? sizeof(DecimalFormat)=%d\n", sizeof(DecimalFormatInternal), UNUM_DECIMALFORMAT_INTERNAL_SIZE, sizeof(DecimalFormat));
6603 DecimalFormat df(UnicodeString("0000",""),status);
6617 DecimalFormat df(UnicodeString("0000000000000000000",""),status);
6636 DecimalFormat df(UnicodeString("0000000000000000000",""),status);
6655 DecimalFormat df(UnicodeString("0000000000000000000",""),status);
6674 DecimalFormat df(UnicodeString("0000000000000000000",""),status);