diff --git a/icu4c/source/test/cintltst/cbiapts.c b/icu4c/source/test/cintltst/cbiapts.c index 7cea5c6a86b..a148636b988 100644 --- a/icu4c/source/test/cintltst/cbiapts.c +++ b/icu4c/source/test/cintltst/cbiapts.c @@ -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) { diff --git a/icu4c/source/test/cintltst/cnumtst.c b/icu4c/source/test/cintltst/cnumtst.c index 7e02ca68352..dbb40fed218 100644 --- a/icu4c/source/test/cintltst/cnumtst.c +++ b/icu4c/source/test/cintltst/cnumtst.c @@ -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) { diff --git a/icu4c/source/test/intltest/datadrivennumberformattestsuite.cpp b/icu4c/source/test/intltest/datadrivennumberformattestsuite.cpp index 6d760ae97ae..d3c650c2470 100644 --- a/icu4c/source/test/intltest/datadrivennumberformattestsuite.cpp +++ b/icu4c/source/test/intltest/datadrivennumberformattestsuite.cpp @@ -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(); } diff --git a/icu4c/source/test/intltest/tsmthred.cpp b/icu4c/source/test/intltest/tsmthred.cpp index 249a78a8ee8..1a5fdc62f5a 100644 --- a/icu4c/source/test/intltest/tsmthred.cpp +++ b/icu4c/source/test/intltest/tsmthred.cpp @@ -691,7 +691,7 @@ public: status = U_ZERO_ERROR; LocalPointer 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);