ICU-8716 Update intltest and cintltst to pass without data in 49

X-SVN-Rev: 31449
This commit is contained in:
Michael Ow 2012-02-20 19:13:36 +00:00
parent 4b3835d9e9
commit 20e8036d10
5 changed files with 21 additions and 20 deletions

View 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;
}

View 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 + "]");
}
}

View 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;
}

View 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);

View 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");