Lines Matching refs:ec
783 UErrorCode ec = U_ZERO_ERROR;
785 NumberFormat::createCurrencyInstance(Locale::getUS(), ec);
787 if (U_FAILURE(ec)) {
788 dataerrln("FAIL: getCurrencyInstance(US) - %s", u_errorName(ec));
810 fmt = NumberFormat::createCurrencyInstance(Locale::getFrance(), ec);
812 if (U_FAILURE(ec)) {
1197 UErrorCode ec = U_ZERO_ERROR;
1198 DecimalFormatSymbols US(Locale::getUS(), ec);
1199 DecimalFormat fmt("a b#0c ", US, ec);
1200 if (U_FAILURE(ec)) {
1201 errcheckln(ec, "FAIL: Constructor - %s", u_errorName(ec));
1214 // UErrorCode ec = U_ZERO_ERROR;
1216 // NumberFormat* fmt = NumberFormat::createCurrencyInstance(loc, ec);
1217 // if (U_SUCCESS(ec)) {
1693 UErrorCode ec = U_ZERO_ERROR;
1694 NumberFormat* nf = NumberFormat::createCurrencyInstance(locs[i], ec);
1695 if (U_FAILURE(ec)) {
1696 errln("FAIL: Can't create NumberFormat(%s) - %s", locs[i].getName(), u_errorName(ec));
1800 UErrorCode ec = U_ZERO_ERROR;
1814 &isChoiceFormat, &len, &ec)),
1820 &isChoiceFormat, &len, &ec)),
1826 &isChoiceFormat, &len, &ec)),
1832 &isChoiceFormat, &len, &ec)),
1838 &isChoiceFormat, &len, &ec)),
1844 &isChoiceFormat, &len, &ec)),
1850 &isChoiceFormat, &len, &ec)),
1852 assertSuccess("ucurr_getName", ec);
1854 ec = U_ZERO_ERROR;
1858 &len, &ec);
1860 U_USING_FALLBACK_WARNING == ec, TRUE, possibleDataError);
1863 &len, &ec);
1865 U_USING_FALLBACK_WARNING == ec, TRUE, possibleDataError);
1868 &len, &ec);
1870 U_USING_DEFAULT_WARNING == ec || U_USING_FALLBACK_WARNING == ec, TRUE);
1873 &len, &ec);
1875 U_USING_DEFAULT_WARNING == ec, TRUE);
1879 &len, &ec);
1881 U_USING_DEFAULT_WARNING == ec, TRUE);
1887 UErrorCode ec = U_ZERO_ERROR;
1889 CurrencyUnit cu(USD, ec);
1890 assertSuccess("CurrencyUnit", ec);
1908 UErrorCode ec = U_ZERO_ERROR;
1910 CurrencyAmount ca(9, USD, ec);
1911 assertSuccess("CurrencyAmount", ec);
1983 UErrorCode ec = U_ZERO_ERROR;
1984 DecimalFormatSymbols *sym = new DecimalFormatSymbols(Locale::getUS(), ec);
1985 if (U_FAILURE(ec)) {
1986 errcheckln(ec, "Fail: DecimalFormatSymbols constructor - %s", u_errorName(ec));
1992 DecimalFormat fmt(pat, sym, ec);
1993 if (U_FAILURE(ec)) {
2006 sym = new DecimalFormatSymbols(Locale::getUS(), ec);
2007 if (U_FAILURE(ec)) {
2023 sym = new DecimalFormatSymbols(Locale::getUS(), ec);
2024 if (U_FAILURE(ec)) {
2029 DecimalFormat fmt2(pat, sym, ec);
2030 if (U_FAILURE(ec)) {
2035 DecimalFormatSymbols sym2(Locale::getUS(), ec);
2036 if (U_FAILURE(ec)) {
2053 UErrorCode ec = U_ZERO_ERROR;
2055 DecimalFormat fmt(ctou("###.###\\u2030"), ec);
2056 if (!assertSuccess("DecimalFormat ct", ec)) return;
2060 DecimalFormatSymbols sym(Locale::getUS(), ec);
2062 DecimalFormat fmt2("", sym, ec);
2063 fmt2.applyLocalizedPattern("###.###m", ec);
2064 if (!assertSuccess("setup", ec)) return;
2087 UErrorCode ec = U_ZERO_ERROR;
2088 DecimalFormat fmt(pat, ec); // locale doesn't matter here
2089 if (U_SUCCESS(ec) == valid) {
2091 pat, u_errorName(ec));
2093 errcheckln(ec, "FAIL: pattern \"%s\" should have %s; got %s",
2095 u_errorName(ec));
2138 UErrorCode& ec) {
2144 fmt.parse(num, n, ec);
2145 result.adoptObject(new CurrencyAmount(n, cur.getTerminatedBuffer(), ec));
2149 UErrorCode ec = U_ZERO_ERROR;
2150 TextFile reader("NumberFormatTestCases.txt", "UTF8", ec);
2151 if (U_FAILURE(ec)) {
2164 ec = U_ZERO_ERROR;
2165 if (!tokens.next(tok, ec)) {
2173 if (!tokens.next(tok, ec)) goto error;
2176 new DecimalFormatSymbols(Locale::getUS(), ec), ec);
2177 if (U_FAILURE(ec)) {
2184 if (!tokens.next(tok, ec)) goto error;
2185 loc = Locale::createFromName(CharString().appendInvariantChars(tok, ec).data());
2191 if (!tokens.next(tok, ec)) goto error;
2195 fmt = new DecimalFormat(pat, new DecimalFormatSymbols(loc, ec), ec);
2196 if (U_FAILURE(ec)) {
2197 errln("FAIL: " + where + "Pattern \"" + pat + "\": " + u_errorName(ec));
2198 ec = U_ZERO_ERROR;
2199 if (!tokens.next(tok, ec)) goto error;
2200 if (!tokens.next(tok, ec)) goto error;
2202 if (!tokens.next(tok, ec)) goto error;
2212 if (!tokens.next(num, ec)) goto error;
2213 if (!tokens.next(str, ec)) goto error;
2214 ref->parse(num, n, ec);
2215 assertSuccess("parse", ec);
2217 str, fmt->format(n, out.remove(), ec));
2218 assertSuccess("format", ec);
2220 if (!tokens.next(num, ec)) goto error;
2221 ref->parse(num, n, ec);
2222 assertSuccess("parse", ec);
2226 fmt->parse(str, m, ec);
2227 ec);
2235 if (!tokens.next(str, ec)) goto error;
2236 if (!tokens.next(expstr, ec)) goto error;
2238 ref->parse(expstr, exp, ec);
2239 assertSuccess("parse", ec);
2240 fmt->parse(str, n, ec);
2241 assertSuccess("parse", ec);
2247 if (!tokens.next(tok, ec)) goto error;
2253 CharString().appendInvariantChars(mloc, ec).data()), ec);
2254 if (U_FAILURE(ec)) {
2255 errln("FAIL: " + where + "Loc \"" + mloc + "\": " + u_errorName(ec));
2256 ec = U_ZERO_ERROR;
2257 if (!tokens.next(tok, ec)) goto error;
2258 if (!tokens.next(tok, ec)) goto error;
2259 if (!tokens.next(tok, ec)) goto error;
2264 if (!tokens.next(currAmt, ec)) goto error;
2265 if (!tokens.next(str, ec)) goto error;
2266 parseCurrencyAmount(currAmt, *ref, (UChar)0x2F/*'/'*/, n, ec);
2267 if (assertSuccess("parseCurrencyAmount", ec)) {
2269 str, mfmt->format(n, out.remove(), ec));
2270 assertSuccess("format", ec);
2272 if (!tokens.next(currAmt, ec)) goto error;
2273 parseCurrencyAmount(currAmt, *ref, (UChar)0x2F/*'/'*/, n, ec);
2274 if (assertSuccess("parseCurrencyAmount", ec)) {
2277 mfmt->parseObject(str, m, ec);
2278 if (assertSuccess("parseCurrency", ec)) {
2294 if (!tokens.next(testpat, ec)) goto error;
2295 if (!tokens.next(exppat, ec)) goto error;
2342 if (U_SUCCESS(ec)) {
2345 errcheckln(ec, "FAIL: " + where + "Unexpected " + u_errorName(ec));
2534 UErrorCode ec = U_ZERO_ERROR;
2540 ucurr_forLocale(locale.getName(), curr, 4, &ec);
2541 assertSuccess("ucurr_forLocale", ec);
2542 fmt.setCurrency(curr, ec);
2543 assertSuccess("DecimalFormat::setCurrency", ec);
2553 NumberFormat::createInstance(Locale::getUS(), ec);
2555 if (U_FAILURE(ec)) {
3033 UErrorCode ec;
3037 ec = U_ZERO_ERROR;
3039 NumberFormat *fmt = NumberFormat::createInstance(loc,ec);
3041 if (U_FAILURE(ec)) {
3042 dataerrln("FAIL: getInstance(%s) - %s", item->localeName, u_errorName(ec));
3056 ec = U_ZERO_ERROR;
3058 NumberFormat* fmt4= NumberFormat::createInstance(loc4, ec);
3059 if ( ec != U_UNSUPPORTED_ERROR ) {
3064 ec = U_ZERO_ERROR;
3065 NumberingSystem *ns = NumberingSystem::createInstance(ec);
3066 if (U_FAILURE(ec)) {
3067 dataerrln("FAIL: NumberingSystem::createInstance(ec); - %s", u_errorName(ec));
3201 errln("FAIL: measure format parsing: '%s' ec: %s", formats[i], u_errorName(status));
3800 "EC$1.00",