From dd1022af9fd72a91bfe1faba0ab700a9cb51dcb8 Mon Sep 17 00:00:00 2001 From: Craig Date: Mon, 23 Sep 2024 18:17:31 -0700 Subject: [PATCH] ICU-22723 Remove known issues for ICU76 release --- icu4c/source/test/intltest/dtptngts.cpp | 41 ++- icu4c/source/test/intltest/loctest.cpp | 272 ++++++++---------- icu4c/source/test/intltest/tzfmttst.cpp | 29 +- .../ibm/icu/dev/test/util/ULocaleTest.java | 9 - .../dev/test/calendar/IBMCalendarTest.java | 7 +- .../icu/dev/test/translit/RoundTripTest.java | 3 - 6 files changed, 157 insertions(+), 204 deletions(-) diff --git a/icu4c/source/test/intltest/dtptngts.cpp b/icu4c/source/test/intltest/dtptngts.cpp index 21a20ccc8d6c..7f0c100d68c2 100644 --- a/icu4c/source/test/intltest/dtptngts.cpp +++ b/icu4c/source/test/intltest/dtptngts.cpp @@ -589,7 +589,7 @@ void IntlTestDateTimePatternGeneratorAPI::testAPI(/*char *par*/) } // ======== Test getSkeleton and getBaseSkeleton - + int32_t i, count = UPRV_LENGTHOF(testGetSkeletonAndBase); for (i = 0; i < count; i++) { status = U_ZERO_ERROR; @@ -597,15 +597,15 @@ void IntlTestDateTimePatternGeneratorAPI::testAPI(/*char *par*/) UnicodeString expectedSkeleton = UnicodeString(testGetSkeletonAndBase[i][1]); UnicodeString expectedBaseSkeleton = UnicodeString(testGetSkeletonAndBase[i][2]); UnicodeString retSkeleton = gen->getSkeleton(pattern, status); - if(U_FAILURE(status) || retSkeleton != expectedSkeleton ) { - errln("ERROR: Unexpected result from getSkeleton().\n"); - errln(UnicodeString(" Got: ") + retSkeleton + UnicodeString(" Expected: ") + expectedSkeleton ); - } - retSkeleton = gen->getBaseSkeleton(pattern, status); - if(U_FAILURE(status) || retSkeleton != expectedBaseSkeleton) { - errln("ERROR: Unexpected result from getBaseSkeleton().\n"); - errln(UnicodeString(" Got: ") + retSkeleton + UnicodeString(" Expected:")+ expectedBaseSkeleton); - } + if(U_FAILURE(status) || retSkeleton != expectedSkeleton ) { + errln("ERROR: Unexpected result from getSkeleton().\n"); + errln(UnicodeString(" Got: ") + retSkeleton + UnicodeString(" Expected: ") + expectedSkeleton ); + } + retSkeleton = gen->getBaseSkeleton(pattern, status); + if(U_FAILURE(status) || retSkeleton != expectedBaseSkeleton) { + errln("ERROR: Unexpected result from getBaseSkeleton().\n"); + errln(UnicodeString(" Got: ") + retSkeleton + UnicodeString(" Expected:")+ expectedBaseSkeleton); + } } delete format; @@ -1391,11 +1391,6 @@ void IntlTestDateTimePatternGeneratorAPI::testJjMapping() { continue; } // Now check that shortPattern and jPattern use the same hour cycle - if ((uprv_strncmp(localeID, "csw", 3) == 0 || uprv_strncmp(localeID, "kxv_", 4) == 0 || uprv_strncmp(localeID, "zh_Hans_MY", 10) == 0 - || uprv_strncmp(localeID, "yue_Hant_CN", 11) == 0) - && logKnownIssue("CLDR-17199", "Need timeFormats with h for csw, kxv_Xxxx, zh_Hans_MY, yue_Hant_CN")) { - continue; - } UnicodeString jPatSkeleton = DateTimePatternGenerator::staticGetSkeleton(jPattern, status); UnicodeString shortPatSkeleton = DateTimePatternGenerator::staticGetSkeleton(shortPattern, status); if (U_FAILURE(status)) { @@ -1477,13 +1472,13 @@ void IntlTestDateTimePatternGeneratorAPI::test20640_HourCyclArsEnNH() { void IntlTestDateTimePatternGeneratorAPI::testFallbackWithDefaultRootLocale() { UErrorCode status = U_ZERO_ERROR; char original[ULOC_FULLNAME_CAPACITY]; - + uprv_strcpy(original, uloc_getDefault()); uloc_setDefault("root", &status); if (U_FAILURE(status)) { errln("ERROR: Failed to change the default locale to root! Default is: %s\n", uloc_getDefault()); } - + DateTimePatternGenerator* dtpg = icu::DateTimePatternGenerator::createInstance("abcdedf", status); if (U_FAILURE(status)) { @@ -1617,23 +1612,23 @@ void IntlTestDateTimePatternGeneratorAPI::testBestPattern() { { "ckb_IR", "mmSSS", u"mm:ss\u066bSSS" }, { "ckb_IR", "BSSS", u"SSS \u251c'Dayperiod': B\u2524" }, }; - + for (int32_t i = 0; i < UPRV_LENGTHOF(testCases); i++) { UErrorCode err = U_ZERO_ERROR; UnicodeString actualPattern; - + if (uprv_strcmp(testCases[i].skeleton, "full") != 0) { LocalPointer dtpg(DateTimePatternGenerator::createInstance(testCases[i].localeID, err), err); actualPattern = dtpg->getBestPattern(UnicodeString(testCases[i].skeleton), err); } else { LocalPointer df(DateFormat::createDateInstance(DateFormat::kFull, testCases[i].localeID)); SimpleDateFormat* sdf = dynamic_cast(df.getAlias()); - + if (sdf != nullptr) { sdf->toPattern(actualPattern); } } - + if (U_FAILURE(err)) { errln("Failure for test case %s/%s: %s", testCases[i].localeID, testCases[i].skeleton, u_errorName(err)); } else { @@ -1815,11 +1810,11 @@ void IntlTestDateTimePatternGeneratorAPI::testRegionOverride() { for (int32_t i = 0; i < UPRV_LENGTHOF(testCases); i++) { UErrorCode err = U_ZERO_ERROR; LocalPointer dtpg(DateTimePatternGenerator::createInstance(testCases[i].locale, err)); - + if (assertSuccess("Error creating dtpg", err)) { UDateFormatHourCycle actualHourCycle = dtpg->getDefaultHourCycle(err); UnicodeString actualPattern = dtpg->getBestPattern(u"jmm", err); - + if (assertSuccess("Error using dtpg", err)) { assertEquals("Wrong hour cycle", testCases[i].expectedHourCycle, actualHourCycle); assertEquals("Wrong pattern", testCases[i].expectedPattern, actualPattern); diff --git a/icu4c/source/test/intltest/loctest.cpp b/icu4c/source/test/intltest/loctest.cpp index 3b07d4cf29c7..7774c68b67f0 100644 --- a/icu4c/source/test/intltest/loctest.cpp +++ b/icu4c/source/test/intltest/loctest.cpp @@ -4130,10 +4130,6 @@ LocaleTest::TestAddLikelyAndMinimizeSubtags() { for (const auto& item : full_data) { const char* const org = item.from; const char* const exp = item.add; - if (uprv_strcmp(org,"und_Hant_CN") == 0 && - logKnownIssue("CLDR-17908", "und_Hant_CN changed expected result for Likely Subtags")) { - continue; - } Locale res(org); res.addLikelySubtags(status); status.errIfFailureAndReset("\"%s\"", org); @@ -4147,10 +4143,6 @@ LocaleTest::TestAddLikelyAndMinimizeSubtags() { for (const auto& item : full_data) { const char* const org = item.from; const char* const exp = item.remove; - if (uprv_strcmp(org,"und_Hant_CN") == 0 && - logKnownIssue("CLDR-17908", "und_Hant_CN changed expected result for Likely Subtags")) { - continue; - } Locale res(org); res.minimizeSubtags(status); status.errIfFailureAndReset("\"%s\"", org); @@ -4174,10 +4166,10 @@ LocaleTest::TestKeywordVariants() { UErrorCode expectedStatus; } testCases[] = { { - "de_DE@ currency = euro; C o ll A t i o n = Phonebook ; C alen dar = buddhist ", - "de_DE@calendar=buddhist;collation=Phonebook;currency=euro", + "de_DE@ currency = euro; C o ll A t i o n = Phonebook ; C alen dar = buddhist ", + "de_DE@calendar=buddhist;collation=Phonebook;currency=euro", //"de_DE", - //"de_DE@calendar=buddhist;collation=Phonebook;currency=euro", + //"de_DE@calendar=buddhist;collation=Phonebook;currency=euro", {"calendar", "collation", "currency"}, 3, U_ZERO_ERROR @@ -4708,7 +4700,7 @@ void LocaleTest::TestGetLocale() { #if !UCONFIG_NO_SERVICE const char *req; Locale valid, actual, reqLoc; - + // Calendar #if !UCONFIG_NO_FORMATTING { @@ -4769,7 +4761,7 @@ void LocaleTest::TestGetLocale() { errln("FAIL: DecimalFormatSymbols::getLocale() failed"); } else { _checklocs("DecimalFormatSymbols", req, valid, actual); - } + } } delete nf; } @@ -4798,7 +4790,7 @@ void LocaleTest::TestGetLocale() { } else { _checklocs("SimpleDateFormat", req, valid, actual); } - + const DateFormatSymbols* sym = dat->getDateFormatSymbols(); if (sym == nullptr) { errln("FAIL: getDateFormatSymbols returned nullptr"); @@ -4810,7 +4802,7 @@ void LocaleTest::TestGetLocale() { errln("FAIL: DateFormatSymbols::getLocale() failed"); } else { _checklocs("DateFormatSymbols", req, valid, actual); - } + } } delete df; } @@ -4833,7 +4825,7 @@ void LocaleTest::TestGetLocale() { } else { _checklocs("BreakIterator", req, valid, actual); } - + // After registering something, the behavior should be different URegistryKey key = BreakIterator::registerInstance(brk, reqLoc, UBRK_WORD, ec); brk = nullptr; // registerInstance adopts @@ -5103,8 +5095,8 @@ void LocaleTest::TestCanonicalization() { "zh@collation=pinyin", "zh@collation=pinyin", "zh@collation=pinyin" }, { "zh_CN@collation=pinyin", "zh_CN@collation=pinyin", "zh_CN@collation=pinyin" }, { "zh_CN_CA@collation=pinyin", "zh_CN_CA@collation=pinyin", "zh_CN_CA@collation=pinyin" }, - { "en_US_POSIX", "en_US_POSIX", "en_US_POSIX" }, - { "hy_AM_REVISED", "hy_AM_REVISED", "hy_AM_REVISED" }, + { "en_US_POSIX", "en_US_POSIX", "en_US_POSIX" }, + { "hy_AM_REVISED", "hy_AM_REVISED", "hy_AM_REVISED" }, { "no_NO_NY", "no_NO_NY", "no_NO_NY" /* not: "nn_NO" [alan ICU3.0] */ }, { "no@ny", "no@ny", "no__NY" /* not: "nn" [alan ICU3.0] */ }, /* POSIX ID */ { "no-no.utf32@B", "no_NO.utf32@B", "no_NO_B" }, /* POSIX ID */ @@ -5202,11 +5194,11 @@ void LocaleTest::TestCanonicalization() { "es_ES_PREEURO@currency=EUR", "es_ES_PREEURO@currency=EUR", "es_ES_PREEURO@currency=EUR" }, { "es_ES_EURO@currency=ESP", "es_ES_EURO@currency=ESP", "es_ES_EURO@currency=ESP" }, }; - + static const char* label[] = { "createFromName", "createCanonical", "Locale" }; int32_t i, j; - + for (i=0; i < UPRV_LENGTHOF(testCases); i++) { for (j=0; j<3; ++j) { const char* expected = (j==1) ? testCases[i].canonicalID : testCases[i].getNameID; @@ -5385,301 +5377,301 @@ void LocaleTest::TestCurrencyByDate() #if !UCONFIG_NO_FORMATTING UErrorCode status = U_ZERO_ERROR; UDate date = uprv_getUTCtime(); - char16_t TMP[4] = {0, 0, 0, 0}; - int32_t index = 0; - int32_t resLen = 0; + char16_t TMP[4] = {0, 0, 0, 0}; + int32_t index = 0; + int32_t resLen = 0; UnicodeString tempStr, resultStr; - // Cycle through historical currencies + // Cycle through historical currencies date = static_cast(-630720000000.0); // pre 1961 - no currency defined index = ucurr_countCurrencies("eo_AM", date, &status); if (index != 0) - { - errcheckln(status, "FAIL: didn't return 0 for eo_AM - %s", u_errorName(status)); - } + { + errcheckln(status, "FAIL: didn't return 0 for eo_AM - %s", u_errorName(status)); + } resLen = ucurr_forLocaleAndDate("eo_AM", date, index, TMP, 4, &status); if (resLen != 0) { - errcheckln(status, "FAIL: eo_AM didn't return nullptr - %s", u_errorName(status)); + errcheckln(status, "FAIL: eo_AM didn't return nullptr - %s", u_errorName(status)); } status = U_ZERO_ERROR; date = static_cast(0.0); // 1970 - one currency defined index = ucurr_countCurrencies("eo_AM", date, &status); if (index != 1) - { - errcheckln(status, "FAIL: didn't return 1 for eo_AM - %s", u_errorName(status)); - } + { + errcheckln(status, "FAIL: didn't return 1 for eo_AM - %s", u_errorName(status)); + } resLen = ucurr_forLocaleAndDate("eo_AM", date, index, TMP, 4, &status); - tempStr.setTo(TMP); + tempStr.setTo(TMP); resultStr.setTo("SUR"); if (resultStr != tempStr) { errcheckln(status, "FAIL: didn't return SUR for eo_AM - %s", u_errorName(status)); } date = static_cast(693792000000.0); // 1992 - one currency defined - index = ucurr_countCurrencies("eo_AM", date, &status); + index = ucurr_countCurrencies("eo_AM", date, &status); if (index != 1) - { - errcheckln(status, "FAIL: didn't return 1 for eo_AM - %s", u_errorName(status)); - } + { + errcheckln(status, "FAIL: didn't return 1 for eo_AM - %s", u_errorName(status)); + } resLen = ucurr_forLocaleAndDate("eo_AM", date, index, TMP, 4, &status); - tempStr.setTo(TMP); + tempStr.setTo(TMP); resultStr.setTo("RUR"); if (resultStr != tempStr) { errcheckln(status, "FAIL: didn't return RUR for eo_AM - %s", u_errorName(status)); } - date = static_cast(977616000000.0); // post 1993 - one currency defined - index = ucurr_countCurrencies("eo_AM", date, &status); + date = static_cast(977616000000.0); // post 1993 - one currency defined + index = ucurr_countCurrencies("eo_AM", date, &status); if (index != 1) - { - errcheckln(status, "FAIL: didn't return 1 for eo_AM - %s", u_errorName(status)); - } + { + errcheckln(status, "FAIL: didn't return 1 for eo_AM - %s", u_errorName(status)); + } resLen = ucurr_forLocaleAndDate("eo_AM", date, index, TMP, 4, &status); - tempStr.setTo(TMP); + tempStr.setTo(TMP); resultStr.setTo("AMD"); if (resultStr != tempStr) { errcheckln(status, "FAIL: didn't return AMD for eo_AM - %s", u_errorName(status)); } // Locale AD has multiple currencies at once - date = static_cast(977616000000.0); // year 2001 - index = ucurr_countCurrencies("eo_AD", date, &status); + date = static_cast(977616000000.0); // year 2001 + index = ucurr_countCurrencies("eo_AD", date, &status); if (index != 4) - { - errcheckln(status, "FAIL: didn't return 4 for eo_AD - %s", u_errorName(status)); - } + { + errcheckln(status, "FAIL: didn't return 4 for eo_AD - %s", u_errorName(status)); + } resLen = ucurr_forLocaleAndDate("eo_AD", date, 1, TMP, 4, &status); - tempStr.setTo(TMP); + tempStr.setTo(TMP); resultStr.setTo("EUR"); if (resultStr != tempStr) { errcheckln(status, "FAIL: didn't return EUR for eo_AD - %s", u_errorName(status)); } resLen = ucurr_forLocaleAndDate("eo_AD", date, 2, TMP, 4, &status); - tempStr.setTo(TMP); + tempStr.setTo(TMP); resultStr.setTo("ESP"); if (resultStr != tempStr) { errcheckln(status, "FAIL: didn't return ESP for eo_AD - %s", u_errorName(status)); } resLen = ucurr_forLocaleAndDate("eo_AD", date, 3, TMP, 4, &status); - tempStr.setTo(TMP); + tempStr.setTo(TMP); resultStr.setTo("FRF"); if (resultStr != tempStr) { errcheckln(status, "FAIL: didn't return FRF for eo_AD - %s", u_errorName(status)); } resLen = ucurr_forLocaleAndDate("eo_AD", date, 4, TMP, 4, &status); - tempStr.setTo(TMP); + tempStr.setTo(TMP); resultStr.setTo("ADP"); if (resultStr != tempStr) { errcheckln(status, "FAIL: didn't return ADP for eo_AD - %s", u_errorName(status)); } - date = static_cast(0.0); // year 1970 - index = ucurr_countCurrencies("eo_AD", date, &status); + date = static_cast(0.0); // year 1970 + index = ucurr_countCurrencies("eo_AD", date, &status); if (index != 3) - { - errcheckln(status, "FAIL: didn't return 3 for eo_AD - %s", u_errorName(status)); - } + { + errcheckln(status, "FAIL: didn't return 3 for eo_AD - %s", u_errorName(status)); + } resLen = ucurr_forLocaleAndDate("eo_AD", date, 1, TMP, 4, &status); - tempStr.setTo(TMP); + tempStr.setTo(TMP); resultStr.setTo("ESP"); if (resultStr != tempStr) { errcheckln(status, "FAIL: didn't return ESP for eo_AD - %s", u_errorName(status)); } resLen = ucurr_forLocaleAndDate("eo_AD", date, 2, TMP, 4, &status); - tempStr.setTo(TMP); + tempStr.setTo(TMP); resultStr.setTo("FRF"); if (resultStr != tempStr) { errcheckln(status, "FAIL: didn't return FRF for eo_AD - %s", u_errorName(status)); } resLen = ucurr_forLocaleAndDate("eo_AD", date, 3, TMP, 4, &status); - tempStr.setTo(TMP); + tempStr.setTo(TMP); resultStr.setTo("ADP"); if (resultStr != tempStr) { errcheckln(status, "FAIL: didn't return ADP for eo_AD - %s", u_errorName(status)); } - date = static_cast(-630720000000.0); // year 1950 - index = ucurr_countCurrencies("eo_AD", date, &status); + date = static_cast(-630720000000.0); // year 1950 + index = ucurr_countCurrencies("eo_AD", date, &status); if (index != 2) - { - errcheckln(status, "FAIL: didn't return 2 for eo_AD - %s", u_errorName(status)); - } + { + errcheckln(status, "FAIL: didn't return 2 for eo_AD - %s", u_errorName(status)); + } resLen = ucurr_forLocaleAndDate("eo_AD", date, 1, TMP, 4, &status); - tempStr.setTo(TMP); + tempStr.setTo(TMP); resultStr.setTo("ESP"); if (resultStr != tempStr) { errcheckln(status, "FAIL: didn't return ESP for eo_AD - %s", u_errorName(status)); } resLen = ucurr_forLocaleAndDate("eo_AD", date, 2, TMP, 4, &status); - tempStr.setTo(TMP); + tempStr.setTo(TMP); resultStr.setTo("ADP"); if (resultStr != tempStr) { errcheckln(status, "FAIL: didn't return ADP for eo_AD - %s", u_errorName(status)); } - date = static_cast(-2207520000000.0); // year 1900 - index = ucurr_countCurrencies("eo_AD", date, &status); + date = static_cast(-2207520000000.0); // year 1900 + index = ucurr_countCurrencies("eo_AD", date, &status); if (index != 1) - { - errcheckln(status, "FAIL: didn't return 1 for eo_AD - %s", u_errorName(status)); - } + { + errcheckln(status, "FAIL: didn't return 1 for eo_AD - %s", u_errorName(status)); + } resLen = ucurr_forLocaleAndDate("eo_AD", date, 1, TMP, 4, &status); - tempStr.setTo(TMP); + tempStr.setTo(TMP); resultStr.setTo("ESP"); if (resultStr != tempStr) { errcheckln(status, "FAIL: didn't return ESP for eo_AD - %s", u_errorName(status)); } - // Locale UA has gap between years 1994 - 1996 - date = static_cast(788400000000.0); - index = ucurr_countCurrencies("eo_UA", date, &status); + // Locale UA has gap between years 1994 - 1996 + date = static_cast(788400000000.0); + index = ucurr_countCurrencies("eo_UA", date, &status); if (index != 0) - { - errcheckln(status, "FAIL: didn't return 0 for eo_UA - %s", u_errorName(status)); - } + { + errcheckln(status, "FAIL: didn't return 0 for eo_UA - %s", u_errorName(status)); + } resLen = ucurr_forLocaleAndDate("eo_UA", date, index, TMP, 4, &status); if (resLen != 0) { - errcheckln(status, "FAIL: eo_UA didn't return nullptr - %s", u_errorName(status)); + errcheckln(status, "FAIL: eo_UA didn't return nullptr - %s", u_errorName(status)); } status = U_ZERO_ERROR; - // Test index bounds + // Test index bounds resLen = ucurr_forLocaleAndDate("eo_UA", date, 100, TMP, 4, &status); if (resLen != 0) { - errcheckln(status, "FAIL: eo_UA didn't return nullptr - %s", u_errorName(status)); + errcheckln(status, "FAIL: eo_UA didn't return nullptr - %s", u_errorName(status)); } status = U_ZERO_ERROR; resLen = ucurr_forLocaleAndDate("eo_UA", date, 0, TMP, 4, &status); if (resLen != 0) { - errcheckln(status, "FAIL: eo_UA didn't return nullptr - %s", u_errorName(status)); + errcheckln(status, "FAIL: eo_UA didn't return nullptr - %s", u_errorName(status)); } status = U_ZERO_ERROR; - // Test for bogus locale - index = ucurr_countCurrencies("eo_QQ", date, &status); + // Test for bogus locale + index = ucurr_countCurrencies("eo_QQ", date, &status); if (index != 0) - { - errcheckln(status, "FAIL: didn't return 0 for eo_QQ - %s", u_errorName(status)); - } + { + errcheckln(status, "FAIL: didn't return 0 for eo_QQ - %s", u_errorName(status)); + } status = U_ZERO_ERROR; resLen = ucurr_forLocaleAndDate("eo_QQ", date, 1, TMP, 4, &status); if (resLen != 0) { - errcheckln(status, "FAIL: eo_QQ didn't return nullptr - %s", u_errorName(status)); + errcheckln(status, "FAIL: eo_QQ didn't return nullptr - %s", u_errorName(status)); } status = U_ZERO_ERROR; resLen = ucurr_forLocaleAndDate("eo_QQ", date, 0, TMP, 4, &status); if (resLen != 0) { - errcheckln(status, "FAIL: eo_QQ didn't return nullptr - %s", u_errorName(status)); + errcheckln(status, "FAIL: eo_QQ didn't return nullptr - %s", u_errorName(status)); } status = U_ZERO_ERROR; // Cycle through histrocial currencies - date = static_cast(977616000000.0); // 2001 - one currency - index = ucurr_countCurrencies("eo_AO", date, &status); + date = static_cast(977616000000.0); // 2001 - one currency + index = ucurr_countCurrencies("eo_AO", date, &status); if (index != 1) - { - errcheckln(status, "FAIL: didn't return 1 for eo_AO - %s", u_errorName(status)); - } + { + errcheckln(status, "FAIL: didn't return 1 for eo_AO - %s", u_errorName(status)); + } resLen = ucurr_forLocaleAndDate("eo_AO", date, 1, TMP, 4, &status); - tempStr.setTo(TMP); + tempStr.setTo(TMP); resultStr.setTo("AOA"); if (resultStr != tempStr) { errcheckln(status, "FAIL: didn't return AOA for eo_AO - %s", u_errorName(status)); } - date = static_cast(819936000000.0); // 1996 - 2 currencies - index = ucurr_countCurrencies("eo_AO", date, &status); + date = static_cast(819936000000.0); // 1996 - 2 currencies + index = ucurr_countCurrencies("eo_AO", date, &status); if (index != 2) - { - errcheckln(status, "FAIL: didn't return 1 for eo_AO - %s", u_errorName(status)); - } + { + errcheckln(status, "FAIL: didn't return 1 for eo_AO - %s", u_errorName(status)); + } resLen = ucurr_forLocaleAndDate("eo_AO", date, 1, TMP, 4, &status); - tempStr.setTo(TMP); + tempStr.setTo(TMP); resultStr.setTo("AOR"); if (resultStr != tempStr) { errcheckln(status, "FAIL: didn't return AOR for eo_AO - %s", u_errorName(status)); } resLen = ucurr_forLocaleAndDate("eo_AO", date, 2, TMP, 4, &status); - tempStr.setTo(TMP); + tempStr.setTo(TMP); resultStr.setTo("AON"); if (resultStr != tempStr) { errcheckln(status, "FAIL: didn't return AON for eo_AO - %s", u_errorName(status)); } - date = static_cast(662256000000.0); // 1991 - 2 currencies - index = ucurr_countCurrencies("eo_AO", date, &status); + date = static_cast(662256000000.0); // 1991 - 2 currencies + index = ucurr_countCurrencies("eo_AO", date, &status); if (index != 2) - { - errcheckln(status, "FAIL: didn't return 1 for eo_AO - %s", u_errorName(status)); - } + { + errcheckln(status, "FAIL: didn't return 1 for eo_AO - %s", u_errorName(status)); + } resLen = ucurr_forLocaleAndDate("eo_AO", date, 1, TMP, 4, &status); - tempStr.setTo(TMP); + tempStr.setTo(TMP); resultStr.setTo("AON"); if (resultStr != tempStr) { errcheckln(status, "FAIL: didn't return AON for eo_AO - %s", u_errorName(status)); } resLen = ucurr_forLocaleAndDate("eo_AO", date, 2, TMP, 4, &status); - tempStr.setTo(TMP); + tempStr.setTo(TMP); resultStr.setTo("AOK"); if (resultStr != tempStr) { errcheckln(status, "FAIL: didn't return AOK for eo_AO - %s", u_errorName(status)); } - date = static_cast(315360000000.0); // 1980 - one currency - index = ucurr_countCurrencies("eo_AO", date, &status); + date = static_cast(315360000000.0); // 1980 - one currency + index = ucurr_countCurrencies("eo_AO", date, &status); if (index != 1) - { - errcheckln(status, "FAIL: didn't return 1 for eo_AO - %s", u_errorName(status)); - } + { + errcheckln(status, "FAIL: didn't return 1 for eo_AO - %s", u_errorName(status)); + } resLen = ucurr_forLocaleAndDate("eo_AO", date, 1, TMP, 4, &status); - tempStr.setTo(TMP); + tempStr.setTo(TMP); resultStr.setTo("AOK"); if (resultStr != tempStr) { errcheckln(status, "FAIL: didn't return AOK for eo_AO - %s", u_errorName(status)); } - date = static_cast(0.0); // 1970 - no currencies - index = ucurr_countCurrencies("eo_AO", date, &status); + date = static_cast(0.0); // 1970 - no currencies + index = ucurr_countCurrencies("eo_AO", date, &status); if (index != 0) - { - errcheckln(status, "FAIL: didn't return 1 for eo_AO - %s", u_errorName(status)); - } + { + errcheckln(status, "FAIL: didn't return 1 for eo_AO - %s", u_errorName(status)); + } resLen = ucurr_forLocaleAndDate("eo_AO", date, 1, TMP, 4, &status); if (resLen != 0) { - errcheckln(status, "FAIL: eo_AO didn't return nullptr - %s", u_errorName(status)); + errcheckln(status, "FAIL: eo_AO didn't return nullptr - %s", u_errorName(status)); } status = U_ZERO_ERROR; // Test with currency keyword override - date = static_cast(977616000000.0); // 2001 - two currencies - index = ucurr_countCurrencies("eo_DE@currency=DEM", date, &status); + date = static_cast(977616000000.0); // 2001 - two currencies + index = ucurr_countCurrencies("eo_DE@currency=DEM", date, &status); if (index != 2) - { - errcheckln(status, "FAIL: didn't return 2 for eo_DE@currency=DEM - %s", u_errorName(status)); - } + { + errcheckln(status, "FAIL: didn't return 2 for eo_DE@currency=DEM - %s", u_errorName(status)); + } resLen = ucurr_forLocaleAndDate("eo_DE@currency=DEM", date, 1, TMP, 4, &status); - tempStr.setTo(TMP); + tempStr.setTo(TMP); resultStr.setTo("EUR"); if (resultStr != tempStr) { errcheckln(status, "FAIL: didn't return EUR for eo_DE@currency=DEM - %s", u_errorName(status)); } resLen = ucurr_forLocaleAndDate("eo_DE@currency=DEM", date, 2, TMP, 4, &status); - tempStr.setTo(TMP); + tempStr.setTo(TMP); resultStr.setTo("DEM"); if (resultStr != tempStr) { errcheckln(status, "FAIL: didn't return DEM for eo_DE@currency=DEM - %s", u_errorName(status)); } // Test Euro Support - status = U_ZERO_ERROR; // reset + status = U_ZERO_ERROR; // reset date = uprv_getUTCtime(); char16_t USD[4]; ucurr_forLocaleAndDate("en_US", date, 1, USD, 4, &status); - - char16_t YEN[4]; + + char16_t YEN[4]; ucurr_forLocaleAndDate("ja_JP", date, 1, YEN, 4, &status); ucurr_forLocaleAndDate("en_US", date, 1, TMP, 4, &status); @@ -5718,10 +5710,6 @@ void LocaleTest::TestIsRightToLeft() { assertTrue("ckb RTL", Locale("ckb").isRightToLeft(), false, true); // Sorani Kurdish assertFalse("fil LTR", Locale("fil").isRightToLeft()); assertFalse("he-Zyxw LTR", Locale("he-Zyxw").isRightToLeft()); - - if (logKnownIssue("CLDR-17908", "und_Hant_CN changed expected result for Likely Subtags")) { - return; - } } void LocaleTest::TestBug11421() { @@ -5740,7 +5728,7 @@ void LocaleTest::TestBug11421() { // TestBug13277. The failure manifests as valgrind errors. // See the trac ticket for details. -// +// void LocaleTest::TestBug13277() { UErrorCode status = U_ZERO_ERROR; @@ -5840,7 +5828,7 @@ void LocaleTest::TestLocaleCanonicalizationFromFile() return; } // Format: - // ; + // ; while (fgets(line, static_cast(sizeof(line)), testFile.getAlias()) != nullptr) { if (line[0] == '#') { // ignore any lines start with # @@ -5925,14 +5913,6 @@ testLikelySubtagsLineFn(void *context, *pErrorCode = U_ZERO_ERROR; return; } - - if ( (uprv_strcmp(source.c_str(), "und-Latn-MU") == 0 || uprv_strcmp(source.c_str(), "und-Latn-RS") == 0 || uprv_strcmp(source.c_str(), "und-Latn-SL") == 0 - || uprv_strcmp(source.c_str(), "und-Latn-TK") == 0 || uprv_strcmp(source.c_str(), "und-Latn-ZM") == 0 ) - && THIS->logKnownIssue("CLDR-17908", "und_Hant_CN changed expected result for Likely Subtags")) { - return; - } - - Locale actualMax(l); actualMax.addLikelySubtags(*pErrorCode); diff --git a/icu4c/source/test/intltest/tzfmttst.cpp b/icu4c/source/test/intltest/tzfmttst.cpp index e62101710c8e..f77ab192a7ec 100644 --- a/icu4c/source/test/intltest/tzfmttst.cpp +++ b/icu4c/source/test/intltest/tzfmttst.cpp @@ -338,10 +338,10 @@ TimeZoneFormatTest::TestTimeZoneRoundTrip() { } else { // Specific or generic: raw offset must be preserved. if (inRaw != outRaw) { - if ((strcmp(LOCALES[locidx].getName(), "tg") == 0 || strcmp(LOCALES[locidx].getName(), "tg_TJ") == 0) - && logKnownIssue("ICU-22857", "Time zone round test fails for tg/tg_TJ")) { - continue; - } + if ((strcmp(LOCALES[locidx].getName(), "tg") == 0 || strcmp(LOCALES[locidx].getName(), "tg_TJ") == 0) + && logKnownIssue("ICU-22857", "Time zone round test fails for tg/tg_TJ")) { + continue; + } errln(UnicodeString("Raw offset round trip failed; tz=") + *tzid + ", locale=" + LOCALES[locidx].getName() + ", pattern=" + PATTERNS[patidx] + ", time=" + DATES[datidx] + ", str=" + tzstr @@ -533,9 +533,9 @@ TimeZoneFormatTest::TestTimeRoundTrip() { // TimeZoneFormatTest::RunTimeRoundTripTests() // This function loops, running time zone format round trip test cases until there are no more, then returns. -// Threading: multiple invocations of this function are started in parallel +// Threading: multiple invocations of this function are started in parallel // by TimeZoneFormatTest::TestTimeRoundTrip() -// +// void TimeZoneFormatTest::RunTimeRoundTripTests(int32_t threadNumber) { UErrorCode status = U_ZERO_ERROR; UBool REALLY_VERBOSE = false; @@ -577,7 +577,7 @@ void TimeZoneFormatTest::RunTimeRoundTripTests(int32_t threadNumber) { UnicodeString pattern(BASEPATTERN); pattern.append(" ").append(PATTERNS[patidx]); - logln(" Thread %d, Locale %s, Pattern %s", + logln(" Thread %d, Locale %s, Pattern %s", threadNumber, gLocaleData->locales[locidx].getName(), CStr(pattern)()); SimpleDateFormat *sdf = new SimpleDateFormat(pattern, gLocaleData->locales[locidx], status); @@ -620,13 +620,6 @@ void TimeZoneFormatTest::RunTimeRoundTripTests(int32_t threadNumber) { continue; } - if ((*tzid == "America/Miquelon" || *tzid == "America/Hermosillo" || *tzid == "America/Mazatlan") - && uprv_strncmp(gLocaleData->locales[locidx].getName(),"ku",2) == 0 - && uprv_strcmp(PATTERNS[patidx], "v") == 0 - && logKnownIssue("CLDR-17024", "TestTimeRoundTrip fail with tz=America/Miquelon, pattern=v, locale=ku")) { - continue; - } - BasicTimeZone *tz = dynamic_cast(TimeZone::createTimeZone(*tzid)); sdf->setTimeZone(*tz); @@ -1095,7 +1088,7 @@ TimeZoneFormatTest::TestFormat() { const FormatTestData DATA[] = { { "en", - "America/Los_Angeles", + "America/Los_Angeles", dateJan, UTZFMT_STYLE_GENERIC_LOCATION, "Los Angeles Time", @@ -1194,7 +1187,7 @@ TimeZoneFormatTest::TestFormatTZDBNames() { const FormatTestData DATA[] = { { "en", - "America/Chicago", + "America/Chicago", dateJan, UTZFMT_STYLE_SPECIFIC_SHORT, "CST", @@ -1202,7 +1195,7 @@ TimeZoneFormatTest::TestFormatTZDBNames() { }, { "en", - "Asia/Shanghai", + "Asia/Shanghai", dateJan, UTZFMT_STYLE_SPECIFIC_SHORT, "CST", @@ -1210,7 +1203,7 @@ TimeZoneFormatTest::TestFormatTZDBNames() { }, { "zh_Hans", - "Asia/Shanghai", + "Asia/Shanghai", dateJan, UTZFMT_STYLE_SPECIFIC_SHORT, "CST", diff --git a/icu4j/main/common_tests/src/test/java/com/ibm/icu/dev/test/util/ULocaleTest.java b/icu4j/main/common_tests/src/test/java/com/ibm/icu/dev/test/util/ULocaleTest.java index a0be8db017f1..cbde409b7382 100644 --- a/icu4j/main/common_tests/src/test/java/com/ibm/icu/dev/test/util/ULocaleTest.java +++ b/icu4j/main/common_tests/src/test/java/com/ibm/icu/dev/test/util/ULocaleTest.java @@ -4166,10 +4166,6 @@ else if (!res.toString().equals(exp)) { }; for (int i = 0; i < full_data.length; i++) { - if (full_data[i][0].equals("und_Hant_CN") && - logKnownIssue("CLDR-17908", "und_Hant_CN changed expected result for Likely Subtags")) { - continue; - } ULocale org = new ULocale(full_data[i][0]); ULocale res = ULocale.addLikelySubtags(org); String exp = full_data[i][1]; @@ -5718,11 +5714,6 @@ public void likelySubtagsDataDriven(TestCase test) { assertEquals("addLikelySubtags(" + test.source + ") should be unchanged", l, ULocale.addLikelySubtags(l)); } else { - if ( ( test.source.equals("und-Latn-MU") || test.source.equals("und-Latn-RS") || test.source.equals("und-Latn-SL") - || test.source.equals("und-Latn-TK") || test.source.equals("und-Latn-ZM") ) - && logKnownIssue("CLDR-17908", "und_Hant_CN changed expected result for Likely Subtags") ) { - return; - } assertEquals("addLikelySubtags(" + test.source + ")", test.addLikely, ULocale.addLikelySubtags(l).toLanguageTag()); } diff --git a/icu4j/main/core/src/test/java/com/ibm/icu/dev/test/calendar/IBMCalendarTest.java b/icu4j/main/core/src/test/java/com/ibm/icu/dev/test/calendar/IBMCalendarTest.java index 17c8fe073720..bd0bdb4ca169 100644 --- a/icu4j/main/core/src/test/java/com/ibm/icu/dev/test/calendar/IBMCalendarTest.java +++ b/icu4j/main/core/src/test/java/com/ibm/icu/dev/test/calendar/IBMCalendarTest.java @@ -269,10 +269,7 @@ public void TestFirstDayOfWeek() { // ssh => ssh_Arab_AE => Saturday verifyFirstDayOfWeek("ssh", Calendar.MONDAY); // wbl_Arab => wbl_Arab_AF => Saturday - if (!logKnownIssue("CLDR-17907", "wbl-Arab returns wrong first day of the week, probably caused by wrong Likely Subtag algo")) { - verifyFirstDayOfWeek("wbl-Arab", Calendar.SATURDAY); - } - + verifyFirstDayOfWeek("wbl-Arab", Calendar.SATURDAY); // en => en_Latn_US => Sunday verifyFirstDayOfWeek("en", Calendar.SUNDAY); @@ -1220,7 +1217,7 @@ public void TestTypes() { "fr_CH@rg=twcyi", // test for ICU-22364 "fr_CH@rg=ugw", // test for ICU-22364 "fr_TH@rg=SA", // ignore malformed rg tag, use buddhist - "th@rg=SA", // ignore malformed rg tag, use buddhist + "th@rg=SA", // ignore malformed rg tag, use buddhist }; String[] types = { diff --git a/icu4j/main/translit/src/test/java/com/ibm/icu/dev/test/translit/RoundTripTest.java b/icu4j/main/translit/src/test/java/com/ibm/icu/dev/test/translit/RoundTripTest.java index 4a10e93c58fb..5884ace56aa3 100644 --- a/icu4j/main/translit/src/test/java/com/ibm/icu/dev/test/translit/RoundTripTest.java +++ b/icu4j/main/translit/src/test/java/com/ibm/icu/dev/test/translit/RoundTripTest.java @@ -378,9 +378,6 @@ public void Testel() throws IOException { @Test public void TestCyrillic() throws IOException { - if (logKnownIssue("CLDR-16218", "ICU4C Transliterator RoundTripTest finds many problems with updated Cyrillic-Latin transform")) { - return; - } long start = System.currentTimeMillis(); new TransliterationTest("Latin-Cyrillic") .test("[a-zA-Z\u0110\u0111\u02BA\u02B9]", "[\u0400-\u045F]", null, this, new Legal());