]> granicus.if.org Git - icu/commitdiff
ICU-8716 Update intltest and cintltst to pass without data in 49
authorMichael Ow <mow@svn.icu-project.org>
Mon, 20 Feb 2012 19:13:36 +0000 (19:13 +0000)
committerMichael Ow <mow@svn.icu-project.org>
Mon, 20 Feb 2012 19:13:36 +0000 (19:13 +0000)
X-SVN-Rev: 31449

icu4c/source/test/cintltst/ccaltst.c
icu4c/source/test/intltest/caltest.cpp
icu4c/source/test/intltest/itrbnf.cpp
icu4c/source/test/intltest/numfmtst.cpp
icu4c/source/test/intltest/numrgts.cpp

index c5e306176cffd6c1a67feb68b6db6529b445af30..eae184bbc735e77e8d59083e9bf029dcacd58e96 100644 (file)
@@ -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;
     }
 
index 308101ff6099b6d303e74bd4f0a46848666ab27b..21fc18cd6fd52ab7433f1757f99a91ee78550812 100644 (file)
@@ -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 + "]");
             }
         }
index 09c8aeaab521bd7437682e5c5b8de633494646e9..57ec7f1fabbea900727559c778f5c48e6fee1b42 100644 (file)
@@ -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;
     }
 
index 1e9c705abb4409befa00968f969f992a8c76cf29..119d57e41fd51ac9778ec40e9904d685de634494 100644 (file)
@@ -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);
index ee6a88422f921838515cbf54b3df6b9d0454cc81..8617bfc099d4acba9c9a22725ead7693ea87de6c 100644 (file)
@@ -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");