ICU-22938 FiIx unit tests for 'und_Hant_CN' in C & J

This commit is contained in:
Craig 2024-10-03 12:52:21 -07:00 committed by Craig Cornelius
parent 9e68dceba9
commit ebbadebdfd
2 changed files with 13 additions and 37 deletions

View file

@ -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);

View file

@ -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));