From: Michael Ow Date: Mon, 20 Feb 2012 19:13:36 +0000 (+0000) Subject: ICU-8716 Update intltest and cintltst to pass without data in 49 X-Git-Tag: milestone-59-0-1~4020 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=20e8036d10f49708ffc679fc073d790a520421ad;p=icu ICU-8716 Update intltest and cintltst to pass without data in 49 X-SVN-Rev: 31449 --- diff --git a/icu4c/source/test/cintltst/ccaltst.c b/icu4c/source/test/cintltst/ccaltst.c index c5e306176cf..eae184bbc73 100644 --- a/icu4c/source/test/cintltst/ccaltst.c +++ b/icu4c/source/test/cintltst/ccaltst.c @@ -1815,7 +1815,7 @@ void TestAmbiguousWallTime() { log_err("FAIL: Calculating time 2011-11-06 01:30:00 with UCAL_WALLTIME_FIRST - %s\n", u_errorName(status)); status = U_ZERO_ERROR; } else if (t != expected) { - log_err("FAIL: 2011-11-06 01:30:00 with UCAL_WALLTIME_FIRST - got: %f, expected: %f\n", t, expected); + log_data_err("FAIL: 2011-11-06 01:30:00 with UCAL_WALLTIME_FIRST - got: %f, expected: %f\n", t, expected); } /* UCAL_WALLTIME_LAST on US fall transition */ @@ -1828,7 +1828,7 @@ void TestAmbiguousWallTime() { log_err("FAIL: Calculating time 2011-11-06 01:30:00 with UCAL_WALLTIME_LAST - %s\n", u_errorName(status)); status = U_ZERO_ERROR; } else if (t != expected) { - log_err("FAIL: 2011-11-06 01:30:00 with UCAL_WALLTIME_LAST - got: %f, expected: %f\n", t, expected); + log_data_err("FAIL: 2011-11-06 01:30:00 with UCAL_WALLTIME_LAST - got: %f, expected: %f\n", t, expected); } /* UCAL_WALLTIME_FIRST on US spring transition */ @@ -1841,7 +1841,7 @@ void TestAmbiguousWallTime() { log_err("FAIL: Calculating time 2011-03-13 02:30:00 with UCAL_WALLTIME_FIRST - %s\n", u_errorName(status)); status = U_ZERO_ERROR; } else if (t != expected) { - log_err("FAIL: 2011-03-13 02:30:00 with UCAL_WALLTIME_FIRST - got: %f, expected: %f\n", t, expected); + log_data_err("FAIL: 2011-03-13 02:30:00 with UCAL_WALLTIME_FIRST - got: %f, expected: %f\n", t, expected); } /* UCAL_WALLTIME_LAST on US spring transition */ @@ -1854,7 +1854,7 @@ void TestAmbiguousWallTime() { log_err("FAIL: Calculating time 2011-03-13 02:30:00 with UCAL_WALLTIME_LAST - %s\n", u_errorName(status)); status = U_ZERO_ERROR; } else if (t != expected) { - log_err("FAIL: 2011-03-13 02:30:00 with UCAL_WALLTIME_LAST - got: %f, expected: %f\n", t, expected); + log_data_err("FAIL: 2011-03-13 02:30:00 with UCAL_WALLTIME_LAST - got: %f, expected: %f\n", t, expected); } /* UCAL_WALLTIME_NEXT_VALID on US spring transition */ @@ -1867,7 +1867,7 @@ void TestAmbiguousWallTime() { log_err("FAIL: Calculating time 2011-03-13 02:30:00 with UCAL_WALLTIME_NEXT_VALID - %s\n", u_errorName(status)); status = U_ZERO_ERROR; } else if (t != expected) { - log_err("FAIL: 2011-03-13 02:30:00 with UCAL_WALLTIME_NEXT_VALID - got: %f, expected: %f\n", t, expected); + log_data_err("FAIL: 2011-03-13 02:30:00 with UCAL_WALLTIME_NEXT_VALID - got: %f, expected: %f\n", t, expected); } /* non-lenient on US spring transition */ @@ -1877,7 +1877,7 @@ void TestAmbiguousWallTime() { t = ucal_getMillis(ucal, &status); if (U_SUCCESS(status)) { /* must return error */ - log_err("FAIL: Non-lenient did not fail with 2011-03-13 02:30:00\n"); + log_data_err("FAIL: Non-lenient did not fail with 2011-03-13 02:30:00\n"); status = U_ZERO_ERROR; } diff --git a/icu4c/source/test/intltest/caltest.cpp b/icu4c/source/test/intltest/caltest.cpp index 308101ff609..21fc18cd6fd 100644 --- a/icu4c/source/test/intltest/caltest.cpp +++ b/icu4c/source/test/intltest/caltest.cpp @@ -2454,7 +2454,7 @@ void CalendarTest::TestRepeatedWallTime(void) { + RPDATA[i].in.toString(buf, sizeof(buf)) + "[" + RPDATA[i].tzid + "]"); } else { if (outLastGMT != RPDATA[i].expLastGMT) { - errln(UnicodeString("Fail: UCAL_WALLTIME_LAST ") + RPDATA[i].in.toString(buf, sizeof(buf)) + "[" + RPDATA[i].tzid + "] is parsed as " + dataerrln(UnicodeString("Fail: UCAL_WALLTIME_LAST ") + RPDATA[i].in.toString(buf, sizeof(buf)) + "[" + RPDATA[i].tzid + "] is parsed as " + outLastGMT.toString(buf, sizeof(buf)) + "[GMT]. Expected: " + RPDATA[i].expLastGMT.toString(buf, sizeof(buf)) + "[GMT]"); } } @@ -2470,7 +2470,7 @@ void CalendarTest::TestRepeatedWallTime(void) { + RPDATA[i].in.toString(buf, sizeof(buf)) + "[" + RPDATA[i].tzid + "]"); } else { if (outDefGMT != RPDATA[i].expLastGMT) { - errln(UnicodeString("Fail: (default) ") + RPDATA[i].in.toString(buf, sizeof(buf)) + "[" + RPDATA[i].tzid + "] is parsed as " + dataerrln(UnicodeString("Fail: (default) ") + RPDATA[i].in.toString(buf, sizeof(buf)) + "[" + RPDATA[i].tzid + "] is parsed as " + outDefGMT.toString(buf, sizeof(buf)) + "[GMT]. Expected: " + RPDATA[i].expLastGMT.toString(buf, sizeof(buf)) + "[GMT]"); } } @@ -2486,7 +2486,7 @@ void CalendarTest::TestRepeatedWallTime(void) { + RPDATA[i].in.toString(buf, sizeof(buf)) + "[" + RPDATA[i].tzid + "]"); } else { if (outFirstGMT != RPDATA[i].expFirstGMT) { - errln(UnicodeString("Fail: UCAL_WALLTIME_FIRST ") + RPDATA[i].in.toString(buf, sizeof(buf)) + "[" + RPDATA[i].tzid + "] is parsed as " + dataerrln(UnicodeString("Fail: UCAL_WALLTIME_FIRST ") + RPDATA[i].in.toString(buf, sizeof(buf)) + "[" + RPDATA[i].tzid + "] is parsed as " + outFirstGMT.toString(buf, sizeof(buf)) + "[GMT]. Expected: " + RPDATA[i].expFirstGMT.toString(buf, sizeof(buf)) + "[GMT]"); } } @@ -2562,13 +2562,13 @@ void CalendarTest::TestSkippedWallTime(void) { + SKDATA[i].in.toString(buf, sizeof(buf)) + "[" + SKDATA[i].tzid + "]"); } else { if (outLastGMT != SKDATA[i].expLastGMT) { - errln(UnicodeString("Fail: UCAL_WALLTIME_LAST ") + SKDATA[i].in.toString(buf, sizeof(buf)) + "[" + SKDATA[i].tzid + "] is parsed as " + dataerrln(UnicodeString("Fail: UCAL_WALLTIME_LAST ") + SKDATA[i].in.toString(buf, sizeof(buf)) + "[" + SKDATA[i].tzid + "] is parsed as " + outLastGMT.toString(buf, sizeof(buf)) + "[GMT]. Expected: " + SKDATA[i].expLastGMT.toString(buf, sizeof(buf)) + "[GMT]"); } } } else if (U_SUCCESS(status)) { // strict, invalid wall time - must report an error - errln(UnicodeString("Fail: An error expected (UCAL_WALLTIME_LAST)") + + dataerrln(UnicodeString("Fail: An error expected (UCAL_WALLTIME_LAST)") + + SKDATA[i].in.toString(buf, sizeof(buf)) + "[" + SKDATA[i].tzid + "]"); } @@ -2586,13 +2586,13 @@ void CalendarTest::TestSkippedWallTime(void) { + SKDATA[i].in.toString(buf, sizeof(buf)) + "[" + SKDATA[i].tzid + "]"); } else { if (outDefGMT != SKDATA[i].expLastGMT) { - errln(UnicodeString("Fail: (default) ") + SKDATA[i].in.toString(buf, sizeof(buf)) + "[" + SKDATA[i].tzid + "] is parsed as " + dataerrln(UnicodeString("Fail: (default) ") + SKDATA[i].in.toString(buf, sizeof(buf)) + "[" + SKDATA[i].tzid + "] is parsed as " + outDefGMT.toString(buf, sizeof(buf)) + "[GMT]. Expected: " + SKDATA[i].expLastGMT.toString(buf, sizeof(buf)) + "[GMT]"); } } } else if (U_SUCCESS(status)) { // strict, invalid wall time - must report an error - errln(UnicodeString("Fail: An error expected (default)") + + dataerrln(UnicodeString("Fail: An error expected (default)") + + SKDATA[i].in.toString(buf, sizeof(buf)) + "[" + SKDATA[i].tzid + "]"); } @@ -2610,13 +2610,13 @@ void CalendarTest::TestSkippedWallTime(void) { + SKDATA[i].in.toString(buf, sizeof(buf)) + "[" + SKDATA[i].tzid + "]"); } else { if (outFirstGMT != SKDATA[i].expFirstGMT) { - errln(UnicodeString("Fail: UCAL_WALLTIME_FIRST ") + SKDATA[i].in.toString(buf, sizeof(buf)) + "[" + SKDATA[i].tzid + "] is parsed as " + dataerrln(UnicodeString("Fail: UCAL_WALLTIME_FIRST ") + SKDATA[i].in.toString(buf, sizeof(buf)) + "[" + SKDATA[i].tzid + "] is parsed as " + outFirstGMT.toString(buf, sizeof(buf)) + "[GMT]. Expected: " + SKDATA[i].expFirstGMT.toString(buf, sizeof(buf)) + "[GMT]"); } } } else if (U_SUCCESS(status)) { // strict, invalid wall time - must report an error - errln(UnicodeString("Fail: An error expected (UCAL_WALLTIME_FIRST)") + + dataerrln(UnicodeString("Fail: An error expected (UCAL_WALLTIME_FIRST)") + + SKDATA[i].in.toString(buf, sizeof(buf)) + "[" + SKDATA[i].tzid + "]"); } @@ -2634,13 +2634,13 @@ void CalendarTest::TestSkippedWallTime(void) { + SKDATA[i].in.toString(buf, sizeof(buf)) + "[" + SKDATA[i].tzid + "]"); } else { if (outNextAvailGMT != SKDATA[i].expNextAvailGMT) { - errln(UnicodeString("Fail: UCAL_WALLTIME_NEXT_VALID ") + SKDATA[i].in.toString(buf, sizeof(buf)) + "[" + SKDATA[i].tzid + "] is parsed as " + dataerrln(UnicodeString("Fail: UCAL_WALLTIME_NEXT_VALID ") + SKDATA[i].in.toString(buf, sizeof(buf)) + "[" + SKDATA[i].tzid + "] is parsed as " + outNextAvailGMT.toString(buf, sizeof(buf)) + "[GMT]. Expected: " + SKDATA[i].expNextAvailGMT.toString(buf, sizeof(buf)) + "[GMT]"); } } } else if (U_SUCCESS(status)) { // strict, invalid wall time - must report an error - errln(UnicodeString("Fail: An error expected (UCAL_WALLTIME_NEXT_VALID)") + + dataerrln(UnicodeString("Fail: An error expected (UCAL_WALLTIME_NEXT_VALID)") + + SKDATA[i].in.toString(buf, sizeof(buf)) + "[" + SKDATA[i].tzid + "]"); } } diff --git a/icu4c/source/test/intltest/itrbnf.cpp b/icu4c/source/test/intltest/itrbnf.cpp index 09c8aeaab52..57ec7f1fabb 100644 --- a/icu4c/source/test/intltest/itrbnf.cpp +++ b/icu4c/source/test/intltest/itrbnf.cpp @@ -1912,7 +1912,7 @@ IntlTestRBNF::TestSetDecimalFormatSymbols() { RuleBasedNumberFormat rbnf(URBNF_ORDINAL, Locale::getEnglish(), status); if (U_FAILURE(status)) { - errln("Unable to create RuleBasedNumberFormat - " + UnicodeString(u_errorName(status))); + dataerrln("Unable to create RuleBasedNumberFormat - " + UnicodeString(u_errorName(status))); return; } diff --git a/icu4c/source/test/intltest/numfmtst.cpp b/icu4c/source/test/intltest/numfmtst.cpp index 1e9c705abb4..119d57e41fd 100644 --- a/icu4c/source/test/intltest/numfmtst.cpp +++ b/icu4c/source/test/intltest/numfmtst.cpp @@ -6550,7 +6550,8 @@ NumberFormatTest::Test9087(void) UErrorCode status = U_ZERO_ERROR; UNumberFormat* fmt = unum_open(UNUM_PATTERN_DECIMAL,pattern,1,NULL,NULL,&status); if ( U_FAILURE(status) ) { - errln("FAIL: error in unum_open()"); + dataerrln("FAIL: error in unum_open() - %s", u_errorName(status)); + return; } unum_setSymbol(fmt,UNUM_INFINITY_SYMBOL,infstr,3,&status); diff --git a/icu4c/source/test/intltest/numrgts.cpp b/icu4c/source/test/intltest/numrgts.cpp index ee6a88422f9..8617bfc099d 100644 --- a/icu4c/source/test/intltest/numrgts.cpp +++ b/icu4c/source/test/intltest/numrgts.cpp @@ -2835,7 +2835,7 @@ void NumberFormatRegressionTest::Test9109(void) { fmt.setLenient(TRUE); if (U_FAILURE(status)) { - errln("Failed to create DecimalFormat with pattern '+##'"); + dataerrln("Failed to create DecimalFormat with pattern '+##' - %s", u_errorName(status)); } UnicodeString text("123");