diff --git a/icu4c/source/i18n/rbnf.cpp b/icu4c/source/i18n/rbnf.cpp index f5f8313063..de260118fa 100644 --- a/icu4c/source/i18n/rbnf.cpp +++ b/icu4c/source/i18n/rbnf.cpp @@ -1748,6 +1748,9 @@ RuleBasedNumberFormat::getDecimalFormatSymbols() const NFRule* RuleBasedNumberFormat::initializeDefaultInfinityRule(UErrorCode &status) { + if (U_FAILURE(status)) { + return NULL; + } if (defaultInfinityRule == NULL) { UnicodeString rule(UNICODE_STRING_SIMPLE("Inf: ")); rule.append(getDecimalFormatSymbols()->getSymbol(DecimalFormatSymbols::kInfinitySymbol)); @@ -1771,6 +1774,9 @@ RuleBasedNumberFormat::getDefaultInfinityRule() const NFRule* RuleBasedNumberFormat::initializeDefaultNaNRule(UErrorCode &status) { + if (U_FAILURE(status)) { + return NULL; + } if (defaultNaNRule == NULL) { UnicodeString rule(UNICODE_STRING_SIMPLE("NaN: ")); rule.append(getDecimalFormatSymbols()->getSymbol(DecimalFormatSymbols::kNaNSymbol)); diff --git a/icu4c/source/test/cintltst/cbiapts.c b/icu4c/source/test/cintltst/cbiapts.c index 96d26b0654..e654c094ad 100644 --- a/icu4c/source/test/cintltst/cbiapts.c +++ b/icu4c/source/test/cintltst/cbiapts.c @@ -852,6 +852,9 @@ static void TestBreakIteratorRefresh(void) { bi = ubrk_open(UBRK_LINE, "en_US", NULL, 0, &status); TEST_ASSERT_SUCCESS(status); + if (U_FAILURE(status)) { + return; + } utext_openUChars(&ut1, testStr, -1, &status); TEST_ASSERT_SUCCESS(status); diff --git a/icu4c/source/test/intltest/dcfmapts.cpp b/icu4c/source/test/intltest/dcfmapts.cpp index 48884c83b7..2f7dd3f5a0 100644 --- a/icu4c/source/test/intltest/dcfmapts.cpp +++ b/icu4c/source/test/intltest/dcfmapts.cpp @@ -447,6 +447,7 @@ void IntlTestDecimalFormatAPI::TestCurrencyPluralInfo(){ DecimalFormat *df = new DecimalFormat(status); if(U_FAILURE(status)) { errcheckln(status, "ERROR: Could not create DecimalFormat - %s", u_errorName(status)); + return; } df->adoptCurrencyPluralInfo(cpi); @@ -607,6 +608,9 @@ void IntlTestDecimalFormatAPI::TestFixedDecimal() { LocalPointer df(new DecimalFormat("###", status), status); TEST_ASSERT_STATUS(status); + if (status == U_MISSING_RESOURCE_ERROR) { + return; + } FixedDecimal fd = df->getFixedDecimal(44, status); TEST_ASSERT_STATUS(status); ASSERT_EQUAL(44, fd.source); diff --git a/icu4c/source/test/intltest/itrbnf.cpp b/icu4c/source/test/intltest/itrbnf.cpp index 66ee2b8fca..8b27d94fc6 100644 --- a/icu4c/source/test/intltest/itrbnf.cpp +++ b/icu4c/source/test/intltest/itrbnf.cpp @@ -2147,7 +2147,7 @@ void IntlTestRBNF::TestInfinityNaN() { { NULL, NULL } }; if (U_FAILURE(status)) { - errln("Unable to create RuleBasedNumberFormat - " + UnicodeString(u_errorName(status))); + dataerrln("Unable to create RuleBasedNumberFormat - " + UnicodeString(u_errorName(status))); return; } @@ -2200,7 +2200,7 @@ void IntlTestRBNF::TestVariableDecimalPoint() { { NULL, NULL } }; if (U_FAILURE(status)) { - errln("Unable to create RuleBasedNumberFormat - " + UnicodeString(u_errorName(status))); + dataerrln("Unable to create RuleBasedNumberFormat - " + UnicodeString(u_errorName(status))); return; } doTest(&enFormatter, enTestPointData, true); diff --git a/icu4c/source/test/intltest/numberformat2test.cpp b/icu4c/source/test/intltest/numberformat2test.cpp index 446acbac55..6beb35b8b4 100644 --- a/icu4c/source/test/intltest/numberformat2test.cpp +++ b/icu4c/source/test/intltest/numberformat2test.cpp @@ -1409,11 +1409,11 @@ void NumberFormat2Test::TestCurrencyAffixInfo() { return; } info.set("en", rules.getAlias(), USD, status); - assertEquals("", "$", info.getSymbol()); - assertEquals("", "USD", info.getISO()); - assertEquals("", "US dollar", info.getLong().getByCategory("one").toString()); - assertEquals("", "US dollars", info.getLong().getByCategory("other").toString()); - assertEquals("", "US dollars", info.getLong().getByCategory("two").toString()); + assertEquals("", "$", info.getSymbol(), TRUE); + assertEquals("", "USD", info.getISO(), TRUE); + assertEquals("", "US dollar", info.getLong().getByCategory("one").toString(), TRUE); + assertEquals("", "US dollars", info.getLong().getByCategory("other").toString(), TRUE); + assertEquals("", "US dollars", info.getLong().getByCategory("two").toString(), TRUE); assertFalse("", info.isDefault()); info.set(NULL, NULL, NULL, status); assertTrue("", info.isDefault()); @@ -1491,6 +1491,10 @@ void NumberFormat2Test::TestAffixPatternParser() { static UChar USD[] = {0x55, 0x53, 0x44, 0x0}; LocalPointer rules(PluralRules::forLocale("en", status)); DecimalFormatSymbols symbols("en", status); + if (U_FAILURE(status)) { + dataerrln("Error creating DecimalFormatSymbols - %s", u_errorName(status)); + return; + } AffixPatternParser parser(symbols); CurrencyAffixInfo currencyAffixInfo; currencyAffixInfo.set("en", rules.getAlias(), USD, status); @@ -2679,6 +2683,10 @@ void NumberFormat2Test::TestPluralsAndRoundingScientific() { void NumberFormat2Test::TestRoundingIncrement() { UErrorCode status = U_ZERO_ERROR; DecimalFormatSymbols symbols("en", status); + if (U_FAILURE(status)) { + dataerrln("Error creating DecimalFormatSymbols - %s", u_errorName(status)); + return; + } DigitFormatter formatter(symbols); ScientificPrecision precision; SciFormatterOptions options; diff --git a/icu4c/source/test/intltest/numfmtspectest.cpp b/icu4c/source/test/intltest/numfmtspectest.cpp index d3e25fd80c..bf3686eb11 100644 --- a/icu4c/source/test/intltest/numfmtspectest.cpp +++ b/icu4c/source/test/intltest/numfmtspectest.cpp @@ -1,6 +1,6 @@ /* ******************************************************************************* -* Copyright (C) 2014, International Business Machines Corporation and * +* Copyright (C) 2014-2015, International Business Machines Corporation and * * others. All Rights Reserved. * ******************************************************************************* * @@ -36,7 +36,10 @@ static NumberFormat *nfWithPattern(const char *pattern) { UErrorCode status = U_ZERO_ERROR; DecimalFormat *result = new DecimalFormat( upattern, new DecimalFormatSymbols("fr", status), status); - U_ASSERT(status == U_ZERO_ERROR); + if (U_FAILURE(status)) { + return NULL; + } + return result; } @@ -96,6 +99,10 @@ void NumberFormatSpecificationTest::TestBasicPatterns() { void NumberFormatSpecificationTest::TestNfSetters() { LocalPointer nf(nfWithPattern("#,##0.##")); + if (nf == NULL) { + dataerrln("Error creating NumberFormat"); + return; + } nf->setMaximumIntegerDigits(5); nf->setMinimumIntegerDigits(4); assertEquals("", "34 567,89", format(1234567.89, *nf), TRUE); @@ -187,10 +194,14 @@ void NumberFormatSpecificationTest::TestPadding() { UnicodeString result; DecimalFormat fmt( upattern, new DecimalFormatSymbols("fr", status), status); - fmt.setCurrency(kJPY); - fmt.format(433.22, result); - assertSuccess("", status); - assertEquals("", "JPY ****433", result, TRUE); + if (U_FAILURE(status)) { + dataerrln("Error creating DecimalFormat - %s", u_errorName(status)); + } else { + fmt.setCurrency(kJPY); + fmt.format(433.22, result); + assertSuccess("", status); + assertEquals("", "JPY ****433", result, TRUE); + } } { UnicodeString upattern( @@ -202,9 +213,13 @@ void NumberFormatSpecificationTest::TestPadding() { upattern, new DecimalFormatSymbols("en_US", status), status); - fmt.format(-433.22, result); - assertSuccess("", status); - assertEquals("", "USD (433.22)", result, TRUE); + if (U_FAILURE(status)) { + dataerrln("Error creating DecimalFormat - %s", u_errorName(status)); + } else { + fmt.format(-433.22, result); + assertSuccess("", status); + assertEquals("", "USD (433.22)", result, TRUE); + } } const char *paddedSciPattern = "QU**00.#####E0"; assertPatternFr("QU***43,3E-1", 4.33, paddedSciPattern, TRUE); @@ -216,10 +231,14 @@ void NumberFormatSpecificationTest::TestPadding() { paddedSciPattern, sym, status); - UnicodeString result; - fmt.format(4.33, result); - assertSuccess("", status); - assertEquals("", "QU**43,3EE-1", result, TRUE); + if (U_FAILURE(status)) { + dataerrln("Error creating DecimalFormat - %s", u_errorName(status)); + } else { + UnicodeString result; + fmt.format(4.33, result); + assertSuccess("", status); + assertEquals("", "QU**43,3EE-1", result, TRUE); + } } // padding cannot work as intended with scientific notation. assertPatternFr("QU**43,32E-1", 4.332, paddedSciPattern, TRUE); @@ -238,6 +257,10 @@ void NumberFormatSpecificationTest::assertPatternFr( UnicodeString result; DecimalFormat fmt( upattern, new DecimalFormatSymbols("fr_FR", status), status); + if (U_FAILURE(status)) { + dataerrln("Error creating DecimalFormatSymbols - %s", u_errorName(status)); + return; + } fmt.format(x, result); fixNonBreakingSpace(result); assertSuccess("", status); diff --git a/icu4c/source/test/intltest/numfmtst.cpp b/icu4c/source/test/intltest/numfmtst.cpp index b70ed7f4b5..92d59bfa93 100644 --- a/icu4c/source/test/intltest/numfmtst.cpp +++ b/icu4c/source/test/intltest/numfmtst.cpp @@ -960,6 +960,10 @@ void NumberFormatTest::TestInt64() { UErrorCode status = U_ZERO_ERROR; DecimalFormat fmt("#.#E0",status); + if (U_FAILURE(status)) { + dataerrln("Error creating DecimalFormat - %s", u_errorName(status)); + return; + } fmt.setMaximumFractionDigits(20); if (U_SUCCESS(status)) { expect(fmt, (Formattable)(int64_t)0, "0E0"); @@ -7165,86 +7169,106 @@ void NumberFormatTest::TestFormatFastpaths() { { UErrorCode status=U_ZERO_ERROR; DecimalFormat df(UnicodeString("0000",""),status); - int64_t long_number = 1; - UnicodeString expect = "0001"; - UnicodeString result; - FieldPosition pos; - df.format(long_number, result, pos); - if(U_FAILURE(status)||expect!=result) { - errcheckln(status, "FAIL: expected '"+expect+"' got '"+result+"' status "+UnicodeString(u_errorName(status),"")); + if (U_FAILURE(status)) { + dataerrln("Error creating DecimalFormat - %s", u_errorName(status)); } else { - logln("OK: got expected '"+result+"' status "+UnicodeString(u_errorName(status),"")); + int64_t long_number = 1; + UnicodeString expect = "0001"; + UnicodeString result; + FieldPosition pos; + df.format(long_number, result, pos); + if(U_FAILURE(status)||expect!=result) { + errcheckln(status, "FAIL: expected '"+expect+"' got '"+result+"' status "+UnicodeString(u_errorName(status),"")); + } else { + logln("OK: got expected '"+result+"' status "+UnicodeString(u_errorName(status),"")); + } } } { UErrorCode status=U_ZERO_ERROR; DecimalFormat df(UnicodeString("0000000000000000000",""),status); - int64_t long_number = U_INT64_MIN; // -9223372036854775808L; - // uint8_t bits[8]; - // memcpy(bits,&long_number,8); - // for(int i=0;i<8;i++) { - // logln("bits: %02X", (unsigned int)bits[i]); - // } - UnicodeString expect = "-9223372036854775808"; - UnicodeString result; - FieldPosition pos; - df.format(long_number, result, pos); - if(U_FAILURE(status)||expect!=result) { - errcheckln(status, "FAIL: expected '"+expect+"' got '"+result+"' status "+UnicodeString(u_errorName(status),"")+" on -9223372036854775808"); + if (U_FAILURE(status)) { + dataerrln("Error creating DecimalFormat - %s", u_errorName(status)); } else { - logln("OK: got expected '"+result+"' status "+UnicodeString(u_errorName(status),"")+" on -9223372036854775808"); + int64_t long_number = U_INT64_MIN; // -9223372036854775808L; + // uint8_t bits[8]; + // memcpy(bits,&long_number,8); + // for(int i=0;i<8;i++) { + // logln("bits: %02X", (unsigned int)bits[i]); + // } + UnicodeString expect = "-9223372036854775808"; + UnicodeString result; + FieldPosition pos; + df.format(long_number, result, pos); + if(U_FAILURE(status)||expect!=result) { + errcheckln(status, "FAIL: expected '"+expect+"' got '"+result+"' status "+UnicodeString(u_errorName(status),"")+" on -9223372036854775808"); + } else { + logln("OK: got expected '"+result+"' status "+UnicodeString(u_errorName(status),"")+" on -9223372036854775808"); + } } } { UErrorCode status=U_ZERO_ERROR; DecimalFormat df(UnicodeString("0000000000000000000",""),status); - int64_t long_number = U_INT64_MAX; // -9223372036854775808L; - // uint8_t bits[8]; - // memcpy(bits,&long_number,8); - // for(int i=0;i<8;i++) { - // logln("bits: %02X", (unsigned int)bits[i]); - // } - UnicodeString expect = "9223372036854775807"; - UnicodeString result; - FieldPosition pos; - df.format(long_number, result, pos); - if(U_FAILURE(status)||expect!=result) { - errcheckln(status, "FAIL: expected '"+expect+"' got '"+result+"' status "+UnicodeString(u_errorName(status),"")+" on U_INT64_MAX"); + if (U_FAILURE(status)) { + dataerrln("Error creating DecimalFormat - %s", u_errorName(status)); } else { - logln("OK: got expected '"+result+"' status "+UnicodeString(u_errorName(status),"")+" on U_INT64_MAX"); + int64_t long_number = U_INT64_MAX; // -9223372036854775808L; + // uint8_t bits[8]; + // memcpy(bits,&long_number,8); + // for(int i=0;i<8;i++) { + // logln("bits: %02X", (unsigned int)bits[i]); + // } + UnicodeString expect = "9223372036854775807"; + UnicodeString result; + FieldPosition pos; + df.format(long_number, result, pos); + if(U_FAILURE(status)||expect!=result) { + errcheckln(status, "FAIL: expected '"+expect+"' got '"+result+"' status "+UnicodeString(u_errorName(status),"")+" on U_INT64_MAX"); + } else { + logln("OK: got expected '"+result+"' status "+UnicodeString(u_errorName(status),"")+" on U_INT64_MAX"); + } } } { UErrorCode status=U_ZERO_ERROR; DecimalFormat df(UnicodeString("0000000000000000000",""),status); - int64_t long_number = 0; - // uint8_t bits[8]; - // memcpy(bits,&long_number,8); - // for(int i=0;i<8;i++) { - // logln("bits: %02X", (unsigned int)bits[i]); - // } - UnicodeString expect = "0000000000000000000"; - UnicodeString result; - FieldPosition pos; - df.format(long_number, result, pos); - if(U_FAILURE(status)||expect!=result) { - errcheckln(status, "FAIL: expected '"+expect+"' got '"+result+"' status "+UnicodeString(u_errorName(status),"")+" on 0"); + if (U_FAILURE(status)) { + dataerrln("Error creating DecimalFormat - %s", u_errorName(status)); } else { - logln("OK: got expected '"+result+"' status "+UnicodeString(u_errorName(status),"")+" on 0"); + int64_t long_number = 0; + // uint8_t bits[8]; + // memcpy(bits,&long_number,8); + // for(int i=0;i<8;i++) { + // logln("bits: %02X", (unsigned int)bits[i]); + // } + UnicodeString expect = "0000000000000000000"; + UnicodeString result; + FieldPosition pos; + df.format(long_number, result, pos); + if(U_FAILURE(status)||expect!=result) { + errcheckln(status, "FAIL: expected '"+expect+"' got '"+result+"' status "+UnicodeString(u_errorName(status),"")+" on 0"); + } else { + logln("OK: got expected '"+result+"' status "+UnicodeString(u_errorName(status),"")+" on 0"); + } } } { UErrorCode status=U_ZERO_ERROR; DecimalFormat df(UnicodeString("0000000000000000000",""),status); - int64_t long_number = U_INT64_MIN + 1; - UnicodeString expect = "-9223372036854775807"; - UnicodeString result; - FieldPosition pos; - df.format(long_number, result, pos); - if(U_FAILURE(status)||expect!=result) { - errcheckln(status, "FAIL: expected '"+expect+"' got '"+result+"' status "+UnicodeString(u_errorName(status),"")+" on -9223372036854775807"); + if (U_FAILURE(status)) { + dataerrln("Error creating DecimalFormat - %s", u_errorName(status)); } else { - logln("OK: got expected '"+result+"' status "+UnicodeString(u_errorName(status),"")+" on -9223372036854775807"); + int64_t long_number = U_INT64_MIN + 1; + UnicodeString expect = "-9223372036854775807"; + UnicodeString result; + FieldPosition pos; + df.format(long_number, result, pos); + if(U_FAILURE(status)||expect!=result) { + errcheckln(status, "FAIL: expected '"+expect+"' got '"+result+"' status "+UnicodeString(u_errorName(status),"")+" on -9223372036854775807"); + } else { + logln("OK: got expected '"+result+"' status "+UnicodeString(u_errorName(status),"")+" on -9223372036854775807"); + } } } } @@ -8300,7 +8324,10 @@ void NumberFormatTest::TestGetAffixes() { UnicodeString pattern("\\u00a4\\u00a4\\u00a4 0.00 %\\u00a4\\u00a4"); pattern = pattern.unescape(); DecimalFormat fmt(pattern, sym, status); - assertSuccess("", status); + if (U_FAILURE(status)) { + dataerrln("Error creating DecimalFormat - %s", u_errorName(status)); + return; + } UnicodeString affixStr; assertEquals("", "US dollars ", fmt.getPositivePrefix(affixStr)); assertEquals("", " %USD", fmt.getPositiveSuffix(affixStr)); @@ -8354,6 +8381,10 @@ void NumberFormatTest::TestToPatternScientific11648() { Locale en("en"); DecimalFormatSymbols sym(en, status); DecimalFormat fmt("0.00", sym, status); + if (U_FAILURE(status)) { + dataerrln("Error creating DecimalFormat - %s", u_errorName(status)); + return; + } fmt.setScientificNotation(TRUE); UnicodeString pattern; assertEquals("", "0.00E0", fmt.toPattern(pattern)); @@ -8416,6 +8447,10 @@ void NumberFormatTest::TestBenchmark() { void NumberFormatTest::TestFractionalDigitsForCurrency() { UErrorCode status = U_ZERO_ERROR; LocalPointer fmt(NumberFormat::createCurrencyInstance("en", status)); + if (U_FAILURE(status)) { + dataerrln("Error creating NumberFormat - %s", u_errorName(status)); + return; + } UChar JPY[] = {0x4A, 0x50, 0x59, 0x0}; fmt->setCurrency(JPY, status); if (!assertSuccess("", status)) { @@ -8429,6 +8464,10 @@ void NumberFormatTest::TestFormatCurrencyPlural() { UErrorCode status = U_ZERO_ERROR; Locale locale = Locale::createCanonical("en_US"); NumberFormat *fmt = NumberFormat::createInstance(locale, UNUM_CURRENCY_PLURAL, status); + if (U_FAILURE(status)) { + dataerrln("Error creating NumberFormat - %s", u_errorName(status)); + return; + } UnicodeString formattedNum; fmt->format(11234.567, formattedNum, NULL, status); assertEquals("", "11,234.57 US dollars", formattedNum); @@ -8440,6 +8479,10 @@ void NumberFormatTest::TestCtorApplyPatternDifference() { DecimalFormatSymbols sym("en_US", status); UnicodeString pattern("\\u00a40"); DecimalFormat fmt(pattern.unescape(), sym, status); + if (U_FAILURE(status)) { + dataerrln("Error creating DecimalFormat - %s", u_errorName(status)); + return; + } UnicodeString result; assertEquals( "ctor favors precision of currency", diff --git a/icu4c/source/test/intltest/numrgts.cpp b/icu4c/source/test/intltest/numrgts.cpp index c4d6160342..aa0f2b4e0e 100644 --- a/icu4c/source/test/intltest/numrgts.cpp +++ b/icu4c/source/test/intltest/numrgts.cpp @@ -346,7 +346,10 @@ void NumberFormatRegressionTest::Test4087535 (void) { UErrorCode status = U_ZERO_ERROR; DecimalFormat *df = new DecimalFormat(status); - failure(status, "new DecimalFormat", ""); + if (U_FAILURE(status)) { + dataerrln("Error creating DecimalFormat - %s", u_errorName(status)); + return; + } df->setMinimumIntegerDigits(0); double n = 0; @@ -371,7 +374,10 @@ void NumberFormatRegressionTest::Test4088503 (void) { UErrorCode status = U_ZERO_ERROR; DecimalFormat *df = new DecimalFormat(status); - failure(status, "new DecimalFormat", ""); + if (U_FAILURE(status)) { + dataerrln("Error creating DecimalFormat - %s", u_errorName(status)); + return; + } df->setGroupingSize(0); UnicodeString sBuf; FieldPosition fp(FieldPosition::DONT_CARE); @@ -1344,7 +1350,10 @@ void NumberFormatRegressionTest::Test4061302(void) { UErrorCode status = U_ZERO_ERROR; DecimalFormatSymbols *fmt = new DecimalFormatSymbols(status); - failure(status, "new DecimalFormatSymbols"); + if (U_FAILURE(status)) { + dataerrln("Error creating DecimalFormatSymbols - %s", u_errorName(status)); + return; + } UnicodeString currency(fmt->getSymbol(DecimalFormatSymbols::kCurrencySymbol)); UnicodeString intlCurrency(fmt->getSymbol(DecimalFormatSymbols::kIntlCurrencySymbol)); UnicodeString monDecSeparator(fmt->getSymbol(DecimalFormatSymbols::kMonetarySeparatorSymbol)); @@ -1382,7 +1391,10 @@ void NumberFormatRegressionTest::Test4062486(void) { UErrorCode status = U_ZERO_ERROR; DecimalFormat *fmt = new DecimalFormat(UnicodeString("#,##0.00"), status); - failure(status, "new DecimalFormat"); + if (U_FAILURE(status)) { + dataerrln("Error creating DecimalFormat - %s", u_errorName(status)); + return; + } UnicodeString formatted; FieldPosition field(0); double num = 1234.5; @@ -2849,12 +2861,12 @@ void NumberFormatRegressionTest::Test9109(void) { Formattable val; ParsePosition pos; DecimalFormat fmt("+##", status); - fmt.setLenient(TRUE); - if (U_FAILURE(status)) { dataerrln("Failed to create DecimalFormat with pattern '+##' - %s", u_errorName(status)); + return; } + fmt.setLenient(TRUE); UnicodeString text("123"); int32_t expected = 123; int32_t expos = 3; diff --git a/icu4c/source/test/intltest/unifiedcachetest.cpp b/icu4c/source/test/intltest/unifiedcachetest.cpp index acc0347b4c..1f5a3bf6da 100644 --- a/icu4c/source/test/intltest/unifiedcachetest.cpp +++ b/icu4c/source/test/intltest/unifiedcachetest.cpp @@ -99,7 +99,7 @@ void UnifiedCacheTest::TestEvictionUnderStress() { } int64_t evictedCountAfter = cache->autoEvictedCount(); if (evictedCountBefore == evictedCountAfter) { - errln("%s:%d Items should have been evicted from cache", + dataerrln("%s:%d Items should have been evicted from cache", __FILE__, __LINE__); } } diff --git a/icu4c/source/test/intltest/usettest.cpp b/icu4c/source/test/intltest/usettest.cpp index 46e502ea82..f715c5bffb 100644 --- a/icu4c/source/test/intltest/usettest.cpp +++ b/icu4c/source/test/intltest/usettest.cpp @@ -3889,7 +3889,7 @@ void UnicodeSetTest::TestUCAUnsafeBackwards() { // Get the unsafeBackwardsSet const CollationCacheEntry *rootEntry = CollationRoot::getRootCacheEntry(errorCode); if(U_FAILURE(errorCode)) { - errln("FAIL: %s getting root cache entry", u_errorName(errorCode)); + dataerrln("FAIL: %s getting root cache entry", u_errorName(errorCode)); return; } //const UVersionInfo &version = rootEntry->tailoring->version;