ICU-11628 Fix some no data test failures

X-SVN-Rev: 37633
This commit is contained in:
Michael Ow 2015-06-30 23:45:58 +00:00
parent 58fd505a84
commit 73e9defb72
4 changed files with 9 additions and 3 deletions

View file

@ -903,6 +903,9 @@ static void TestBug11665(void) {
ctest_resetICU();
bi = ubrk_open(UBRK_WORD, "en_US", japaneseText, UPRV_LENGTHOF(japaneseText), &status);
TEST_ASSERT_SUCCESS(status);
if (!bi) {
return;
}
for (brk=ubrk_first(bi); brk != UBRK_DONE; brk=ubrk_next(bi)) {
boundaries[brkIdx] = brk;
if (++brkIdx >= UPRV_LENGTHOF(boundaries) - 1) {

View file

@ -2814,7 +2814,7 @@ static void TestVariousStylesAndAttributes(void) {
UErrorCode status = U_ZERO_ERROR;
UNumberFormat * unum = unum_open(lsaTestPtr->style, NULL, 0, lsaTestPtr->locale, NULL, &status);
if ( U_FAILURE(status) ) {
log_err("FAIL: unum_open style %d, locale %s: error %s\n", (int)lsaTestPtr->style, lsaTestPtr->locale, u_errorName(status));
log_data_err("FAIL: unum_open style %d, locale %s: error %s\n", (int)lsaTestPtr->style, lsaTestPtr->locale, u_errorName(status));
} else {
const ValueAndExpectedString * veItemPtr;
if (lsaTestPtr->attribute >= 0) {

View file

@ -168,7 +168,7 @@ void DataDrivenNumberFormatTestSuite::showFailure(const UnicodeString &message)
uprv_itou(
lineStr, UPRV_LENGTHOF(lineStr), (uint32_t) fFileLineNumber, 10, 1);
UnicodeString fullMessage("line ");
errln(fullMessage.append(lineStr).append(": ")
dataerrln(fullMessage.append(lineStr).append(": ")
.append(prettify(message)));
showLineInfo();
}

View file

@ -691,7 +691,7 @@ public:
status = U_ZERO_ERROR;
LocalPointer<NumberFormat> formatter(NumberFormat::createInstance(Locale::getEnglish(),status));
if(U_FAILURE(status)) {
IntlTest::gTest->errln("%s:%d Error %s on NumberFormat::createInstance().",
IntlTest::gTest->dataerrln("%s:%d Error %s on NumberFormat::createInstance().",
__FILE__, __LINE__, u_errorName(status));
goto cleanupAndReturn;
}
@ -1460,6 +1460,9 @@ void MultithreadTest::TestBreakTranslit() {
gSharedTransliterator = Transliterator::createInstance(
UNICODE_STRING_SIMPLE("Any-Latin; Lower; NFD; [:Diacritic:]Remove; NFC; Latin-ASCII;"), UTRANS_FORWARD, status);
if (!gSharedTransliterator) {
return;
}
TSMTHREAD_ASSERT_SUCCESS(status);
UnicodeString expected(*gTranslitInput);