mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-10 07:39:16 +00:00
ICU-9680 Updated TestTimeZoneNames to match the workaround for Java's TimeZoneNameProvider support problem done by #9400.
X-SVN-Rev: 32656
This commit is contained in:
parent
9306ec4e68
commit
3eeef3b050
1 changed files with 8 additions and 3 deletions
|
@ -30,11 +30,16 @@ public class TimeZoneNameTest extends TestFmwk {
|
|||
}
|
||||
|
||||
for (String tzid : tzids) {
|
||||
// Java does not pick up time zone names for ID/Locale from an SPI
|
||||
// when long standard display name is not available.
|
||||
// Java has a problem when a provider does not supply all 4 names
|
||||
// for a zone. For this reason, ICU TimeZoneName provider does not return
|
||||
// localized names unless these 4 names are available.
|
||||
|
||||
String icuStdLong = getIcuDisplayName(tzid, false, TimeZone.LONG, loc);
|
||||
if (icuStdLong != null) {
|
||||
String icuDstLong = getIcuDisplayName(tzid, true, TimeZone.LONG, loc);
|
||||
String icuStdShort = getIcuDisplayName(tzid, false, TimeZone.SHORT, loc);
|
||||
String icuDstShort = getIcuDisplayName(tzid, true, TimeZone.SHORT, loc);
|
||||
|
||||
if (icuStdLong != null && icuDstLong != null && icuStdShort != null && icuDstShort != null) {
|
||||
checkDisplayNamePair(TimeZone.SHORT, tzid, loc, warningOnly);
|
||||
checkDisplayNamePair(TimeZone.LONG, tzid, loc, warningOnly);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue