From ebbadebdfd092ef7841c8b84d08c105f3a5225c6 Mon Sep 17 00:00:00 2001 From: Craig Date: Thu, 3 Oct 2024 12:52:21 -0700 Subject: [PATCH] ICU-22938 FiIx unit tests for 'und_Hant_CN' in C & J --- icu4c/source/test/intltest/loctest.cpp | 24 ++--------------- .../ibm/icu/dev/test/util/ULocaleTest.java | 26 ++++++++----------- 2 files changed, 13 insertions(+), 37 deletions(-) diff --git a/icu4c/source/test/intltest/loctest.cpp b/icu4c/source/test/intltest/loctest.cpp index d62e2548a24..5a781b8acbe 100644 --- a/icu4c/source/test/intltest/loctest.cpp +++ b/icu4c/source/test/intltest/loctest.cpp @@ -3518,8 +3518,8 @@ LocaleTest::TestAddLikelyAndMinimizeSubtags() { "zh_TW" }, { "und_Hant_CN", - "zh_Hant_CN", - "zh_Hant_CN" + "yue_Hant_CN", + "yue_Hant_CN" }, { "und_Hant_TW", "zh_Hant_TW", @@ -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-17981", "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-17981", "und_Hant_CN changed expected result for Likely Subtags")) { - continue; - } Locale res(org); res.minimizeSubtags(status); status.errIfFailureAndReset("\"%s\"", org); @@ -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-17981", "und_Hant_CN changed expected result for Likely Subtags")) { - return; - } } void LocaleTest::TestBug11421() { @@ -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-17981", "und_Hant_CN changed expected result for Likely Subtags")) { - return; - } - - Locale actualMax(l); actualMax.addLikelySubtags(*pErrorCode); 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 02146417fc3..451b12bc01f 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 @@ -3659,9 +3659,9 @@ public class ULocaleTest extends CoreTestFmwk { "zh_Hant_TW", "zh_TW" }, { - "und_Hant_CN", - "zh_Hant_CN", - "zh_Hant_CN" + "und_Hant_CN", + "yue_Hant_CN", + "yue_Hant_CN" }, { "und_Hant_TW", "zh_Hant_TW", @@ -4166,10 +4166,6 @@ public class ULocaleTest extends CoreTestFmwk { }; for (int i = 0; i < full_data.length; i++) { - if (full_data[i][0].equals("und_Hant_CN") && - logKnownIssue("CLDR-17981", "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,14 +5714,14 @@ public class ULocaleTest extends CoreTestFmwk { 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-17981", "und_Hant_CN changed expected result for Likely Subtags") ) { - return; - } - assertEquals("addLikelySubtags(" + test.source + ")", - test.addLikely, ULocale.addLikelySubtags(l).toLanguageTag()); - } + 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-18002", "Incorrect Likely Subtags for some entries modified in CLDR 46") ) { + return; + } + assertEquals("addLikelySubtags(" + test.source + ")", + test.addLikely, ULocale.addLikelySubtags(l).toLanguageTag()); + } if (test.removeFavorRegion.equals("FAIL")) { assertEquals("minimizeSubtags(" + test.source + ") should be unchanged", l, ULocale.minimizeSubtags(l));