Home | History | Annotate | Download | only in intltest

Lines Matching refs:ec

778     UErrorCode ec = U_ZERO_ERROR;
780 NumberFormat::createCurrencyInstance(Locale::getUS(), ec);
782 if (U_FAILURE(ec)) {
783 dataerrln("FAIL: getCurrencyInstance(US) - %s", u_errorName(ec));
805 fmt = NumberFormat::createCurrencyInstance(Locale::getFrance(), ec);
807 if (U_FAILURE(ec)) {
1192 UErrorCode ec = U_ZERO_ERROR;
1193 DecimalFormatSymbols US(Locale::getUS(), ec);
1194 DecimalFormat fmt("a b#0c ", US, ec);
1195 if (U_FAILURE(ec)) {
1196 errcheckln(ec, "FAIL: Constructor - %s", u_errorName(ec));
1209 // UErrorCode ec = U_ZERO_ERROR;
1211 // NumberFormat* fmt = NumberFormat::createCurrencyInstance(loc, ec);
1212 // if (U_SUCCESS(ec)) {
1688 UErrorCode ec = U_ZERO_ERROR;
1689 NumberFormat* nf = NumberFormat::createCurrencyInstance(locs[i], ec);
1690 if (U_FAILURE(ec)) {
1691 errln("FAIL: Can't create NumberFormat(%s) - %s", locs[i].getName(), u_errorName(ec));
1795 UErrorCode ec = U_ZERO_ERROR;
1809 &isChoiceFormat, &len, &ec)),
1815 &isChoiceFormat, &len, &ec)),
1821 &isChoiceFormat, &len, &ec)),
1827 &isChoiceFormat, &len, &ec)),
1833 &isChoiceFormat, &len, &ec)),
1839 &isChoiceFormat, &len, &ec)),
1845 &isChoiceFormat, &len, &ec)),
1847 assertSuccess("ucurr_getName", ec);
1849 ec = U_ZERO_ERROR;
1853 &len, &ec);
1855 U_USING_FALLBACK_WARNING == ec, TRUE, possibleDataError);
1858 &len, &ec);
1860 U_USING_FALLBACK_WARNING == ec, TRUE, possibleDataError);
1863 &len, &ec);
1865 U_USING_DEFAULT_WARNING == ec || U_USING_FALLBACK_WARNING == ec, TRUE);
1868 &len, &ec);
1870 U_USING_DEFAULT_WARNING == ec, TRUE);
1874 &len, &ec);
1876 U_USING_DEFAULT_WARNING == ec, TRUE);
1882 UErrorCode ec = U_ZERO_ERROR;
1884 CurrencyUnit cu(USD, ec);
1885 assertSuccess("CurrencyUnit", ec);
1903 UErrorCode ec = U_ZERO_ERROR;
1905 CurrencyAmount ca(9, USD, ec);
1906 assertSuccess("CurrencyAmount", ec);
1978 UErrorCode ec = U_ZERO_ERROR;
1979 DecimalFormatSymbols *sym = new DecimalFormatSymbols(Locale::getUS(), ec);
1980 if (U_FAILURE(ec)) {
1981 errcheckln(ec, "Fail: DecimalFormatSymbols constructor - %s", u_errorName(ec));
1987 DecimalFormat fmt(pat, sym, ec);
1988 if (U_FAILURE(ec)) {
2001 sym = new DecimalFormatSymbols(Locale::getUS(), ec);
2002 if (U_FAILURE(ec)) {
2018 sym = new DecimalFormatSymbols(Locale::getUS(), ec);
2019 if (U_FAILURE(ec)) {
2024 DecimalFormat fmt2(pat, sym, ec);
2025 if (U_FAILURE(ec)) {
2030 DecimalFormatSymbols sym2(Locale::getUS(), ec);
2031 if (U_FAILURE(ec)) {
2048 UErrorCode ec = U_ZERO_ERROR;
2050 DecimalFormat fmt(ctou("###.###\\u2030"), ec);
2051 if (!assertSuccess("DecimalFormat ct", ec)) return;
2055 DecimalFormatSymbols sym(Locale::getUS(), ec);
2057 DecimalFormat fmt2("", sym, ec);
2058 fmt2.applyLocalizedPattern("###.###m", ec);
2059 if (!assertSuccess("setup", ec)) return;
2082 UErrorCode ec = U_ZERO_ERROR;
2083 DecimalFormat fmt(pat, ec); // locale doesn't matter here
2084 if (U_SUCCESS(ec) == valid) {
2086 pat, u_errorName(ec));
2088 errcheckln(ec, "FAIL: pattern \"%s\" should have %s; got %s",
2090 u_errorName(ec));
2133 UErrorCode& ec) {
2139 fmt.parse(num, n, ec);
2140 result.adoptObject(new CurrencyAmount(n, cur.getTerminatedBuffer(), ec));
2144 UErrorCode ec = U_ZERO_ERROR;
2145 TextFile reader("NumberFormatTestCases.txt", "UTF8", ec);
2146 if (U_FAILURE(ec)) {
2159 ec = U_ZERO_ERROR;
2160 if (!tokens.next(tok, ec)) {
2168 if (!tokens.next(tok, ec)) goto error;
2171 new DecimalFormatSymbols(Locale::getUS(), ec), ec);
2172 if (U_FAILURE(ec)) {
2179 if (!tokens.next(tok, ec)) goto error;
2180 loc = Locale::createFromName(CharString().appendInvariantChars(tok, ec).data());
2186 if (!tokens.next(tok, ec)) goto error;
2190 fmt = new DecimalFormat(pat, new DecimalFormatSymbols(loc, ec), ec);
2191 if (U_FAILURE(ec)) {
2192 errln("FAIL: " + where + "Pattern \"" + pat + "\": " + u_errorName(ec));
2193 ec = U_ZERO_ERROR;
2194 if (!tokens.next(tok, ec)) goto error;
2195 if (!tokens.next(tok, ec)) goto error;
2197 if (!tokens.next(tok, ec)) goto error;
2207 if (!tokens.next(num, ec)) goto error;
2208 if (!tokens.next(str, ec)) goto error;
2209 ref->parse(num, n, ec);
2210 assertSuccess("parse", ec);
2212 str, fmt->format(n, out.remove(), ec));
2213 assertSuccess("format", ec);
2215 if (!tokens.next(num, ec)) goto error;
2216 ref->parse(num, n, ec);
2217 assertSuccess("parse", ec);
2221 fmt->parse(str, m, ec);
2222 assertSuccess("parse", ec);
2230 if (!tokens.next(str, ec)) goto error;
2231 if (!tokens.next(expstr, ec)) goto error;
2233 ref->parse(expstr, exp, ec);
2234 assertSuccess("parse", ec);
2235 fmt->parse(str, n, ec);
2236 assertSuccess("parse", ec);
2242 if (!tokens.next(tok, ec)) goto error;
2248 CharString().appendInvariantChars(mloc, ec).data()), ec);
2249 if (U_FAILURE(ec)) {
2250 errln("FAIL: " + where + "Loc \"" + mloc + "\": " + u_errorName(ec));
2251 ec = U_ZERO_ERROR;
2252 if (!tokens.next(tok, ec)) goto error;
2253 if (!tokens.next(tok, ec)) goto error;
2254 if (!tokens.next(tok, ec)) goto error;
2259 if (!tokens.next(currAmt, ec)) goto error;
2260 if (!tokens.next(str, ec)) goto error;
2261 parseCurrencyAmount(currAmt, *ref, (UChar)0x2F/*'/'*/, n, ec);
2262 if (assertSuccess("parseCurrencyAmount", ec)) {
2264 str, mfmt->format(n, out.remove(), ec));
2265 assertSuccess("format", ec);
2267 if (!tokens.next(currAmt, ec)) goto error;
2268 parseCurrencyAmount(currAmt, *ref, (UChar)0x2F/*'/'*/, n, ec);
2269 if (assertSuccess("parseCurrencyAmount", ec)) {
2272 mfmt->parseObject(str, m, ec);
2273 if (assertSuccess("parseCurrency", ec)) {
2289 if (!tokens.next(testpat, ec)) goto error;
2290 if (!tokens.next(exppat, ec)) goto error;
2337 if (U_SUCCESS(ec)) {
2340 errcheckln(ec, "FAIL: " + where + "Unexpected " + u_errorName(ec));
2529 UErrorCode ec = U_ZERO_ERROR;
2535 ucurr_forLocale(locale.getName(), curr, 4, &ec);
2536 assertSuccess("ucurr_forLocale", ec);
2537 fmt.setCurrency(curr, ec);
2538 assertSuccess("DecimalFormat::setCurrency", ec);
2548 NumberFormat::createInstance(Locale::getUS(), ec);
2550 if (U_FAILURE(ec)) {
3028 UErrorCode ec;
3032 ec = U_ZERO_ERROR;
3034 NumberFormat *fmt = NumberFormat::createInstance(loc,ec);
3036 if (U_FAILURE(ec)) {
3037 dataerrln("FAIL: getInstance(%s) - %s", item->localeName, u_errorName(ec));
3051 ec = U_ZERO_ERROR;
3053 NumberFormat* fmt4= NumberFormat::createInstance(loc4, ec);
3054 if ( ec != U_UNSUPPORTED_ERROR ) {
3059 ec = U_ZERO_ERROR;
3060 NumberingSystem *ns = NumberingSystem::createInstance(ec);
3061 if (U_FAILURE(ec)) {
3062 dataerrln("FAIL: NumberingSystem::createInstance(ec); - %s", u_errorName(ec));
3196 errln("FAIL: measure format parsing: '%s' ec: %s", formats[i], u_errorName(status));
3795 "EC$1.00",