From 045350e7c1e21861d9a664a586a33ad70a7ad387 Mon Sep 17 00:00:00 2001 From: DraganBesevic Date: Wed, 14 Aug 2024 11:21:47 -0700 Subject: [PATCH] ICU-22723 Integrate CLDR 46 release alpha0, part 4, fixes for exausting tests --- icu4c/source/test/cintltst/creststn.c | 2 +- icu4c/source/test/intltest/dtfmtrtts.cpp | 4 ++++ icu4c/source/test/intltest/numfmtst.cpp | 2 +- icu4c/source/test/intltest/tzfmttst.cpp | 4 ++++ .../java/com/ibm/icu/dev/test/format/TimeZoneFormatTest.java | 4 ++++ 5 files changed, 14 insertions(+), 2 deletions(-) diff --git a/icu4c/source/test/cintltst/creststn.c b/icu4c/source/test/cintltst/creststn.c index 32ec58c82c77..4877d8b49ccf 100644 --- a/icu4c/source/test/cintltst/creststn.c +++ b/icu4c/source/test/cintltst/creststn.c @@ -2185,7 +2185,7 @@ static void TestFallback(void) UResourceBundle* myResB = ures_open(NULL,"no_NO_NY",&err); UResourceBundle* resLocID = ures_getByKey(myResB, "Version", NULL, &err); const UChar* version = NULL; - static const UChar versionStr[] = u"46"; // 45 in nn_NO or in a parent bundle/root + static const UChar versionStr[] = u"46"; // 46 in nn_NO or in a parent bundle/root if(U_FAILURE(err)) { log_data_err("Expected success when trying to test no_NO_NY aliased to nn_NO for Version " diff --git a/icu4c/source/test/intltest/dtfmtrtts.cpp b/icu4c/source/test/intltest/dtfmtrtts.cpp index 1f24f7cc3de5..e0f3cc920988 100644 --- a/icu4c/source/test/intltest/dtfmtrtts.cpp +++ b/icu4c/source/test/intltest/dtfmtrtts.cpp @@ -483,6 +483,10 @@ void DateFormatRoundTripTest::test(DateFormat *fmt, const Locale &origLocale, UB // Use @v to see verbose results on successful cases UBool fail = (dmatch > maxDmatch || smatch > maxSmatch); if (optionv || fail) { + if (timeOnly && uprv_strcmp(origLocale.getName(),"hu_HU@calendar=islamic")==0 && + logKnownIssue("ICU-21049", "hu_HU@calendar=islamic fails round trip")) { + continue; + } if (fail) { errln(UnicodeString("\nFAIL: Pattern: ") + pat + " in Locale: " + origLocale.getName() + diff --git a/icu4c/source/test/intltest/numfmtst.cpp b/icu4c/source/test/intltest/numfmtst.cpp index 5e86f1ec0f5b..a37111a8540d 100644 --- a/icu4c/source/test/intltest/numfmtst.cpp +++ b/icu4c/source/test/intltest/numfmtst.cpp @@ -2110,7 +2110,7 @@ void NumberFormatTest::TestCurrencyNames() { ucurr_getName(CAD, "to", UCURR_LONG_NAME, &isChoiceFormat, &len, &ec); - assertTrue("ucurr_getName (ti default)", + assertTrue("ucurr_getName (to default)", U_USING_DEFAULT_WARNING == ec, true); // Test that a default warning is being returned when falling back to root. JB 4536. diff --git a/icu4c/source/test/intltest/tzfmttst.cpp b/icu4c/source/test/intltest/tzfmttst.cpp index 65294075c05b..e62101710c8e 100644 --- a/icu4c/source/test/intltest/tzfmttst.cpp +++ b/icu4c/source/test/intltest/tzfmttst.cpp @@ -338,6 +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; + } errln(UnicodeString("Raw offset round trip failed; tz=") + *tzid + ", locale=" + LOCALES[locidx].getName() + ", pattern=" + PATTERNS[patidx] + ", time=" + DATES[datidx] + ", str=" + tzstr diff --git a/icu4j/main/common_tests/src/test/java/com/ibm/icu/dev/test/format/TimeZoneFormatTest.java b/icu4j/main/common_tests/src/test/java/com/ibm/icu/dev/test/format/TimeZoneFormatTest.java index f8b1cd3e6efa..dacde3f74c8a 100644 --- a/icu4j/main/common_tests/src/test/java/com/ibm/icu/dev/test/format/TimeZoneFormatTest.java +++ b/icu4j/main/common_tests/src/test/java/com/ibm/icu/dev/test/format/TimeZoneFormatTest.java @@ -275,6 +275,10 @@ public void TestTimeZoneRoundTrip() { } else { // Specific or generic: raw offset must be preserved. if (inOffsets[0] != outOffsets[0] ) { + if ((LOCALES[locidx].toString().equals("tg") || LOCALES[locidx].toString().equals("tg_TJ")) + && logKnownIssue("ICU-22857", "Time zone round test fails for tg/tg_TJ")) { + continue; + } if (JDKTZ && tzids[tzidx].startsWith("SystemV/")) { // JDK uses rule SystemV for these zones while // ICU handles these zones as aliases of existing time zones