Lines Matching refs:pat
211 const char* pat[] = { "#.#", "#.", ".#", "#" };
212 int32_t pat_length = (int32_t)(sizeof(pat) / sizeof(pat[0]));
218 DecimalFormat fmt(pat[i], sym, status);
219 if (U_FAILURE(status)) { errln((UnicodeString)"FAIL: DecimalFormat constructor failed for " + pat[i]); continue; }
222 errln((UnicodeString)"FAIL: Pattern " + pat[i] + " should transmute to " + newpat[i] +
228 errln((UnicodeString)"FAIL: Pattern " + pat[i] + " should format zero as " + num[i] +
268 const char* pat[] = { "0.####E0", "00.000E00", "##0.######E000", "0.###E0;[0.###E0]" };
269 int32_t pat_length = (int32_t)(sizeof(pat) / sizeof(pat[0]));
353 DecimalFormat fmt(pat[p], sym, status);
356 logln((UnicodeString)"Pattern \"" + pat[p] + "\" -toPattern-> \"" +
579 UnicodeString *pat;
586 pat = new UnicodeString("a'fo''o'b#");
587 DecimalFormat *fmt = new DecimalFormat(*pat, *sym, status);
590 logln((UnicodeString)"Pattern \"" + *pat + "\"");
597 delete pat;
599 pat = new UnicodeString("a''b#");
600 fmt = new DecimalFormat(*pat, *sym, status);
602 logln((UnicodeString)"Pattern \"" + *pat + "\"");
607 delete pat;
619 UnicodeString pat;
627 pat.append(currency).append("#,##0.00;-").
629 DecimalFormat *fmt = new DecimalFormat(pat, *sym, status);
631 pat.truncate(0);
632 logln((UnicodeString)"Pattern \"" + fmt->toPattern(pat) + "\"");
640 pat.truncate(0);
642 pat.append(currency).append(currency).
646 fmt = new DecimalFormat(pat, *sym, status);
649 logln((UnicodeString)"Pattern \"" + fmt->toPattern(pat) + "\"");
1008 const char* PAT[] = { "#E0", "0.####E0", "00.000E00", "##0.####E000",
1010 int32_t PAT_length = (int32_t)(sizeof(PAT) / sizeof(PAT[0]));
1020 UnicodeString pat(PAT[i]);
1021 DecimalFormat df(pat, US, status);
1025 if (pat == pat2) {
1027 pat + "\" -> \"" +
1031 pat + "\" -> \"" +
1039 errln(UnicodeString("FAIL \"" + pat +
1717 UnicodeString pat(" #,##0.00");
1718 pat.insert(0, (UChar)0x00A4);
1719 DecimalFormat fmt(pat, sym, ec);
1756 DecimalFormat fmt2(pat, sym, ec);
1811 const char* pat=DATA[i];
1812 UBool valid = (*pat) == '+';
1813 pat += 2;
1815 DecimalFormat fmt(pat, ec); // locale doesn't matter here
1818 pat, u_errorName(ec));
1821 pat, (valid?"succeeded":"failed"),
1837 /*7*/ "pat:", // <pattern or '-'> <exp. toPattern or '-' or 'err'>
1887 UnicodeString pat, tok, mloc, str, out, where, currAmt;
1920 pat = tok;
1922 fmt = new DecimalFormat(pat, new DecimalFormatSymbols(loc, ec), ec);
1924 errln("FAIL: " + where + "Pattern \"" + pat + "\": " + u_errorName(ec));
1943 assertEquals(where + "\"" + pat + "\".format(" + num + ")",
1955 assertEquals(where + "\"" + pat + "\".parse(\"" + str + "\")",
1969 assertEquals(where + "\"" + pat + "\".parse(\"" + str + "\")",
2018 // pat: <pattern> <exp. toPattern, or '-' or 'err'>
2027 errln("FAIL: " + where + "Invalid command \"pat: - err\"");
2031 testpat = pat;
2144 UnicodeString pat;
2145 ((DecimalFormat*) &fmt)->toPattern(pat);
2148 pat + " = " +
2152 pat + " = " +
2217 UnicodeString pat;
2218 ((DecimalFormat*) &fmt)->toPattern(pat);
2221 escape(pat) + " = \"" +
2243 escape(pat) + " = \"" +
2301 UnicodeString pat;
2302 fmt.toPattern(pat);
2303 if (pat == exp) {
2304 logln(UnicodeString("Ok \"") + pat + "\"");
2306 errln(UnicodeString("FAIL \"") + pat + "\", expected \"" + exp + "\"");
2310 void NumberFormatTest::expectPad(DecimalFormat& fmt, const UnicodeString& pat,
2312 expectPad(fmt, pat, pos, 0, (UnicodeString)"");
2314 void NumberFormatTest::expectPad(DecimalFormat& fmt, const UnicodeString& pat,
2316 expectPad(fmt, pat, pos, width, UnicodeString(pad));
2318 void NumberFormatTest::expectPad(DecimalFormat& fmt, const UnicodeString& pat,
2323 fmt.applyPattern(pat, status);
2338 logln(UnicodeString("Ok \"") + pat + "\" pos=" + apos + infoStr);
2340 errln(UnicodeString("FAIL \"") + pat + "\" pos=" + apos +
2780 UnicodeString pat = ctou(DATA[i][1]);
2791 pat = pat.findAndReplace(ctou("\\u00A4"), doubleCurrencyStr);
2793 pat = pat.findAndReplace(ctou("\\u00A4\\u00A4"), tripleCurrencyStr);
2796 DecimalFormat* fmt = new DecimalFormat(pat, new DecimalFormatSymbols(*sym), status);
2894 UnicodeString pat;
2897 pat.append(currency).append(currency).append(currency).append("#,##0.00;-").append(currency).append(currency).append(currency).append("#,##0.00");
2898 DecimalFormat* fmt = new DecimalFormat(pat, sym, status);