Skip to content

Commit e08ceb4

Browse files
authored
CLDR-18510 Ensure timezone alias maps to single bcp47 code; remove obsolete test skips (#5294)
1 parent 948b088 commit e08ceb4

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestBCP47.java

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,6 @@ private String showData(
318318
"WET");
319319

320320
public void testBcp47IdsForAllTimezoneIds() {
321-
// TODO (ICU-23096): remove once ICU is updated.
322-
Set<String> newlyIntroducedTimeZoneIds = Set.of("clcxq");
323321
Map<String, String> aliasToId = new TreeMap<>();
324322
Set<String> missingAliases = new TreeSet<>();
325323
Set<String> deprecatedAliases = new TreeSet<>();
@@ -332,14 +330,22 @@ public void testBcp47IdsForAllTimezoneIds() {
332330
if (itemIsDeprecated) {
333331
deprecatedBcp47s.add(bcp47Type);
334332
}
335-
if (!newlyIntroducedTimeZoneIds.contains(bcp47Type)) {
336-
bcp47IdsNotUsed.add(bcp47Type);
337-
}
338333
if (aliasSet == null) {
339334
continue;
340335
}
341336
for (String alias : aliasSet) {
342-
aliasToId.put(alias, bcp47Type);
337+
String mappedBcp47Type = aliasToId.get(alias);
338+
if (mappedBcp47Type == null) {
339+
aliasToId.put(alias, bcp47Type);
340+
} else {
341+
errln(
342+
"CLDR alias "
343+
+ alias
344+
+ " has mapping to bcp47 "
345+
+ mappedBcp47Type
346+
+ ", trying to also map to "
347+
+ bcp47Type);
348+
}
343349
if (itemIsDeprecated) {
344350
deprecatedAliases.add(alias);
345351
}
@@ -353,14 +359,6 @@ public void testBcp47IdsForAllTimezoneIds() {
353359
if (BOGUS_TZIDS.contains(tzid)) {
354360
continue;
355361
}
356-
if (tzid.equals("Antarctica/South_Pole")) {
357-
// This non-canonical alias was moved from one zone to another per CLDR-16439;
358-
// skip test until we have an ICU updated to reflect this.
359-
logKnownIssue(
360-
"CLDR-18361",
361-
"BRS 48 task, update ICU4J libs for CLDR after 48m1 integration to ICU");
362-
continue;
363-
}
364362
String bcp47Id = aliasToId.get(tzid);
365363
if (!assertNotNull(tzid, bcp47Id)) {
366364
missingAliases.add(tzid);

0 commit comments

Comments
 (0)