ICU-4175 add test list of time zone names to check java remapping

X-SVN-Rev: 18250
This commit is contained in:
Doug Felt 2005-07-14 22:57:51 +00:00
parent 68043eef1c
commit ec2eabd38e

View File

@ -946,6 +946,172 @@ public class TimeZoneTest extends TestFmwk
}
}
}
// jb4175
/* Generated by org.unicode.cldr.tool.CountItems */
private static final String[] timeZoneTestNames = {
"America/Argentina/Buenos_Aires", "America/Buenos_Aires",
"America/Argentina/Catamarca", "America/Catamarca",
"America/Argentina/Cordoba", "America/Cordoba",
"America/Argentina/Jujuy", "America/Jujuy",
"America/Argentina/Mendoza", "America/Mendoza",
"America/Atka", "America/Adak",
"America/Ensenada", "America/Tijuana",
"America/Fort_Wayne", "America/Indianapolis",
"America/Indiana/Indianapolis", "America/Indianapolis",
"America/Kentucky/Louisville", "America/Louisville",
"America/Knox_IN", "America/Indiana/Knox",
"America/Porto_Acre", "America/Rio_Branco",
"America/Rosario", "America/Cordoba",
"America/Virgin", "America/St_Thomas",
"Asia/Ashkhabad", "Asia/Ashgabat",
"Asia/Chungking", "Asia/Chongqing",
"Asia/Dacca", "Asia/Dhaka",
"Asia/Istanbul", "Europe/Istanbul",
"Asia/Macao", "Asia/Macau",
"Asia/Tel_Aviv", "Asia/Jerusalem",
"Asia/Thimbu", "Asia/Thimphu",
"Asia/Ujung_Pandang", "Asia/Makassar",
"Asia/Ulan_Bator", "Asia/Ulaanbaatar",
"Australia/ACT", "Australia/Sydney",
"Australia/Canberra", "Australia/Sydney",
"Australia/LHI", "Australia/Lord_Howe",
"Australia/NSW", "Australia/Sydney",
"Australia/North", "Australia/Darwin",
"Australia/Queensland", "Australia/Brisbane",
"Australia/South", "Australia/Adelaide",
"Australia/Tasmania", "Australia/Hobart",
"Australia/Victoria", "Australia/Melbourne",
"Australia/West", "Australia/Perth",
"Australia/Yancowinna", "Australia/Broken_Hill",
"Brazil/Acre", "America/Rio_Branco",
"Brazil/DeNoronha", "America/Noronha",
"Brazil/East", "America/Sao_Paulo",
"Brazil/West", "America/Manaus",
"CST6CDT", "America/Chicago",
"Canada/Atlantic", "America/Halifax",
"Canada/Central", "America/Winnipeg",
"Canada/East-Saskatchewan", "America/Regina",
"Canada/Eastern", "America/Toronto",
"Canada/Mountain", "America/Edmonton",
"Canada/Newfoundland", "America/St_Johns",
"Canada/Pacific", "America/Vancouver",
"Canada/Saskatchewan", "America/Regina",
"Canada/Yukon", "America/Whitehorse",
"Chile/Continental", "America/Santiago",
"Chile/EasterIsland", "Pacific/Easter",
"Cuba", "America/Havana",
"EST", "America/Indianapolis",
"EST5EDT", "America/New_York",
"Egypt", "Africa/Cairo",
"Eire", "Europe/Dublin",
"Etc/GMT+0", "Etc/GMT",
"Etc/GMT-0", "Etc/GMT",
"Etc/GMT0", "Etc/GMT",
"Etc/Greenwich", "Etc/GMT",
"Etc/UCT", "Etc/GMT",
"Etc/UTC", "Etc/GMT",
"Etc/Universal", "Etc/GMT",
"Etc/Zulu", "Etc/GMT",
"Europe/Nicosia", "Asia/Nicosia",
"Europe/Tiraspol", "Europe/Chisinau",
"GB", "Europe/London",
"GB-Eire", "Europe/London",
"GMT", "Etc/GMT",
"GMT+0", "Etc/GMT",
"GMT-0", "Etc/GMT",
"GMT0", "Etc/GMT",
"Greenwich", "Etc/GMT",
"HST", "Pacific/Honolulu",
"Hongkong", "Asia/Hong_Kong",
"Iceland", "Atlantic/Reykjavik",
"Iran", "Asia/Tehran",
"Israel", "Asia/Jerusalem",
"Jamaica", "America/Jamaica",
"Japan", "Asia/Tokyo",
"Kwajalein", "Pacific/Kwajalein",
"Libya", "Africa/Tripoli",
"MST", "America/Phoenix",
"MST7MDT", "America/Denver",
"Mexico/BajaNorte", "America/Tijuana",
"Mexico/BajaSur", "America/Mazatlan",
"Mexico/General", "America/Mexico_City",
"NZ", "Pacific/Auckland",
"NZ-CHAT", "Pacific/Chatham",
"Navajo", "America/Denver",
"PRC", "Asia/Shanghai",
"PST8PDT", "America/Los_Angeles",
"Pacific/Samoa", "Pacific/Pago_Pago",
"Poland", "Europe/Warsaw",
"Portugal", "Europe/Lisbon",
"ROC", "Asia/Taipei",
"ROK", "Asia/Seoul",
"Singapore", "Asia/Singapore",
"SystemV/AST4", "America/Puerto_Rico",
"SystemV/AST4ADT", "America/Halifax",
"SystemV/CST6", "America/Regina",
"SystemV/CST6CDT", "America/Chicago",
"SystemV/EST5", "America/Indianapolis",
"SystemV/EST5EDT", "America/New_York",
"SystemV/HST10", "Pacific/Honolulu",
"SystemV/MST7", "America/Phoenix",
"SystemV/MST7MDT", "America/Denver",
"SystemV/PST8", "Pacific/Pitcairn",
"SystemV/PST8PDT", "America/Los_Angeles",
"SystemV/YST9", "Pacific/Gambier",
"SystemV/YST9YDT", "America/Anchorage",
"Turkey", "Europe/Istanbul",
"UCT", "Etc/GMT",
"US/Alaska", "America/Anchorage",
"US/Aleutian", "America/Adak",
"US/Arizona", "America/Phoenix",
"US/Central", "America/Chicago",
"US/East-Indiana", "America/Indianapolis",
"US/Eastern", "America/New_York",
"US/Hawaii", "Pacific/Honolulu",
"US/Indiana-Starke", "America/Indiana/Knox",
"US/Michigan", "America/Detroit",
"US/Mountain", "America/Denver",
"US/Pacific", "America/Los_Angeles",
"US/Pacific-New", "America/Los_Angeles",
"US/Samoa", "Pacific/Pago_Pago",
"UTC", "Etc/GMT",
"Universal", "Etc/GMT",
"W-SU", "Europe/Moscow",
"Zulu", "Etc/GMT",
};
public void TestOddTimeZoneNames() {
for (int i = 0; i < timeZoneTestNames.length; i += 2) {
String funkyName = timeZoneTestNames[i];
String correctName = timeZoneTestNames[i+1];
TimeZone ftz = TimeZone.getTimeZone(funkyName);
TimeZone ctz = TimeZone.getTimeZone(correctName);
String fdn = ftz.getDisplayName();
long fro = ftz.getRawOffset();
long fds = ftz.getDSTSavings();
boolean fdy = ftz.useDaylightTime();
String cdn = ctz.getDisplayName();
long cro = ctz.getRawOffset();
long cds = ctz.getDSTSavings();
boolean cdy = ctz.useDaylightTime();
if (!fdn.equals(cdn)) {
logln("display name (" + funkyName + ", " + correctName + ") expected: " + cdn + " but got: " + fdn);
} else if (fro != cro) {
logln("offset (" + funkyName + ", " + correctName + ") expected: " + cro + " but got: " + fro);
} else if (fds != cds) {
logln("daylight (" + funkyName + ", " + correctName + ") expected: " + cds + " but got: " + fds);
} else if (fdy != cdy) {
logln("uses daylight (" + funkyName + ", " + correctName + ") expected: " + cdy + " but got: " + fdy);
} else {
// no error, assume we're referencing the same internal java object
}
}
}
}
//eof