ICU-20016 Skip testing pseudolocale region codes for display names.

At the moment, CLDR pseudolocale region codes don't have display names.
As long as that is so, ICU must not require them to exist in order to
not cause bogus test failures when building with pseudolocales.
This commit is contained in:
Fredrik Roubert 2018-07-10 21:09:47 +02:00 committed by Shane Carr
parent 02a2c9cce9
commit ed5201f293
No known key found for this signature in database
GPG key ID: FCED3B24AAB18B5C

View file

@ -718,7 +718,13 @@ public final class ICUResourceBundleTest extends TestFmwk {
}
for (int i = 0; i < locales.length; ++i) {
if (!hasLocalizedCountryFor(ULocale.ENGLISH, locales[i])){
// The region codes used for pseudolocales don't have display names.
// That might however change in the future, in which case skipping
// testing of these names here would become irrelevant:
// https://unicode.org/cldr/trac/ticket/10880
String country = locales[i].getCountry();
if (!"XA".equals(country) && !"XB".equals(country)
&& !hasLocalizedCountryFor(ULocale.ENGLISH, locales[i])){
errln("Could not get English localized country for " + locales[i]);
}
if(!hasLocalizedLanguageFor(ULocale.ENGLISH, locales[i])){