mirror of https://github.com/tc39/test262.git
Replace time zone link name canonicalisation tests
Replace tests with more simple tests that only ensure link names are accepted.
This commit is contained in:
parent
5d3d39ee16
commit
d7a10658d9
|
@ -0,0 +1,54 @@
|
|||
// Copyright (C) 2022 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.timezone
|
||||
description: >
|
||||
TimeZone constructor accepts link names as its input.
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
const testCases = [
|
||||
"Africa/Accra", // Link Africa/Abidjan Africa/Accra # Ghana
|
||||
"Africa/Bamako", // Link Africa/Abidjan Africa/Bamako # Mali
|
||||
"Africa/Banjul", // Link Africa/Abidjan Africa/Banjul # The Gambia
|
||||
"Africa/Conakry", // Link Africa/Abidjan Africa/Conakry # Guinea
|
||||
"Africa/Dakar", // Link Africa/Abidjan Africa/Dakar # Senegal
|
||||
"Africa/Freetown", // Link Africa/Abidjan Africa/Freetown # Sierra Leone
|
||||
"Africa/Lome", // Link Africa/Abidjan Africa/Lome # Togo
|
||||
"Africa/Nouakchott", // Link Africa/Abidjan Africa/Nouakchott # Mauritania
|
||||
"Africa/Ouagadougou", // Link Africa/Abidjan Africa/Ouagadougou # Burkina Faso
|
||||
"Atlantic/St_Helena", // Link Africa/Abidjan Atlantic/St_Helena # St Helena
|
||||
"Africa/Addis_Ababa", // Link Africa/Nairobi Africa/Addis_Ababa # Ethiopia
|
||||
"Africa/Asmara", // Link Africa/Nairobi Africa/Asmara # Eritrea
|
||||
"Africa/Dar_es_Salaam", // Link Africa/Nairobi Africa/Dar_es_Salaam # Tanzania
|
||||
"Africa/Djibouti", // Link Africa/Nairobi Africa/Djibouti
|
||||
"Africa/Kampala", // Link Africa/Nairobi Africa/Kampala # Uganda
|
||||
"Africa/Mogadishu", // Link Africa/Nairobi Africa/Mogadishu # Somalia
|
||||
"Indian/Antananarivo", // Link Africa/Nairobi Indian/Antananarivo # Madagascar
|
||||
"Indian/Comoro", // Link Africa/Nairobi Indian/Comoro
|
||||
"Indian/Mayotte", // Link Africa/Nairobi Indian/Mayotte
|
||||
"Africa/Blantyre", // Link Africa/Maputo Africa/Blantyre # Malawi
|
||||
"Africa/Bujumbura", // Link Africa/Maputo Africa/Bujumbura # Burundi
|
||||
"Africa/Gaborone", // Link Africa/Maputo Africa/Gaborone # Botswana
|
||||
"Africa/Harare", // Link Africa/Maputo Africa/Harare # Zimbabwe
|
||||
"Africa/Kigali", // Link Africa/Maputo Africa/Kigali # Rwanda
|
||||
"Africa/Lubumbashi", // Link Africa/Maputo Africa/Lubumbashi # E Dem. Rep. of Congo
|
||||
"Africa/Lusaka", // Link Africa/Maputo Africa/Lusaka # Zambia
|
||||
"Africa/Bangui", // Link Africa/Lagos Africa/Bangui # Central African Republic
|
||||
"Africa/Brazzaville", // Link Africa/Lagos Africa/Brazzaville # Rep. of the Congo
|
||||
"Africa/Douala", // Link Africa/Lagos Africa/Douala # Cameroon
|
||||
"Africa/Kinshasa", // Link Africa/Lagos Africa/Kinshasa # Dem. Rep. of the Congo (west)
|
||||
"Africa/Libreville", // Link Africa/Lagos Africa/Libreville # Gabon
|
||||
"Africa/Luanda", // Link Africa/Lagos Africa/Luanda # Angola
|
||||
"Africa/Malabo", // Link Africa/Lagos Africa/Malabo # Equatorial Guinea
|
||||
"Africa/Niamey", // Link Africa/Lagos Africa/Niamey # Niger
|
||||
"Africa/Porto-Novo", // Link Africa/Lagos Africa/Porto-Novo # Benin
|
||||
"Africa/Maseru", // Link Africa/Johannesburg Africa/Maseru # Lesotho
|
||||
"Africa/Mbabane", // Link Africa/Johannesburg Africa/Mbabane # Eswatini
|
||||
];
|
||||
|
||||
for (let id of testCases) {
|
||||
// Doesn't throw a RangeError.
|
||||
new Temporal.TimeZone(id);
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright (C) 2022 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.timezone
|
||||
description: >
|
||||
TimeZone constructor accepts link names as its input.
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
const testCases = [
|
||||
"Europe/Nicosia", // Link Asia/Nicosia Europe/Nicosia
|
||||
"Asia/Bahrain", // Link Asia/Qatar Asia/Bahrain
|
||||
"Antarctica/Syowa", // Link Asia/Riyadh Antarctica/Syowa
|
||||
"Asia/Aden", // Link Asia/Riyadh Asia/Aden # Yemen
|
||||
"Asia/Kuwait", // Link Asia/Riyadh Asia/Kuwait
|
||||
"Asia/Phnom_Penh", // Link Asia/Bangkok Asia/Phnom_Penh # Cambodia
|
||||
"Asia/Vientiane", // Link Asia/Bangkok Asia/Vientiane # Laos
|
||||
"Asia/Muscat", // Link Asia/Dubai Asia/Muscat # Oman
|
||||
];
|
||||
|
||||
for (let id of testCases) {
|
||||
// Doesn't throw a RangeError.
|
||||
new Temporal.TimeZone(id);
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
// Copyright (C) 2022 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.timezone
|
||||
description: >
|
||||
TimeZone constructor accepts link names as its input.
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
const testCases = [
|
||||
"Pacific/Saipan", // Link Pacific/Guam Pacific/Saipan # N Mariana Is
|
||||
"Antarctica/McMurdo", // Link Pacific/Auckland Antarctica/McMurdo
|
||||
"Antarctica/DumontDUrville", // Link Pacific/Port_Moresby Antarctica/DumontDUrville
|
||||
"Pacific/Midway", // Link Pacific/Pago_Pago Pacific/Midway # in US minor outlying islands
|
||||
];
|
||||
|
||||
for (let id of testCases) {
|
||||
// Doesn't throw a RangeError.
|
||||
new Temporal.TimeZone(id);
|
||||
}
|
|
@ -0,0 +1,140 @@
|
|||
// Copyright (C) 2022 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.timezone
|
||||
description: >
|
||||
TimeZone constructor accepts link names as its input.
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
const testCases = [
|
||||
"Africa/Asmera", // Link Africa/Nairobi Africa/Asmera
|
||||
"Africa/Timbuktu", // Link Africa/Abidjan Africa/Timbuktu
|
||||
"America/Argentina/ComodRivadavia", // Link America/Argentina/Catamarca America/Argentina/ComodRivadavia
|
||||
"America/Atka", // Link America/Adak America/Atka
|
||||
"America/Buenos_Aires", // Link America/Argentina/Buenos_Aires America/Buenos_Aires
|
||||
"America/Catamarca", // Link America/Argentina/Catamarca America/Catamarca
|
||||
"America/Coral_Harbour", // Link America/Panama America/Coral_Harbour
|
||||
"America/Cordoba", // Link America/Argentina/Cordoba America/Cordoba
|
||||
"America/Ensenada", // Link America/Tijuana America/Ensenada
|
||||
"America/Fort_Wayne", // Link America/Indiana/Indianapolis America/Fort_Wayne
|
||||
"America/Godthab", // Link America/Nuuk America/Godthab
|
||||
"America/Indianapolis", // Link America/Indiana/Indianapolis America/Indianapolis
|
||||
"America/Jujuy", // Link America/Argentina/Jujuy America/Jujuy
|
||||
"America/Knox_IN", // Link America/Indiana/Knox America/Knox_IN
|
||||
"America/Louisville", // Link America/Kentucky/Louisville America/Louisville
|
||||
"America/Mendoza", // Link America/Argentina/Mendoza America/Mendoza
|
||||
"America/Montreal", // Link America/Toronto America/Montreal
|
||||
"America/Porto_Acre", // Link America/Rio_Branco America/Porto_Acre
|
||||
"America/Rosario", // Link America/Argentina/Cordoba America/Rosario
|
||||
"America/Santa_Isabel", // Link America/Tijuana America/Santa_Isabel
|
||||
"America/Shiprock", // Link America/Denver America/Shiprock
|
||||
"America/Virgin", // Link America/Puerto_Rico America/Virgin
|
||||
"Antarctica/South_Pole", // Link Pacific/Auckland Antarctica/South_Pole
|
||||
"Asia/Ashkhabad", // Link Asia/Ashgabat Asia/Ashkhabad
|
||||
"Asia/Calcutta", // Link Asia/Kolkata Asia/Calcutta
|
||||
"Asia/Chongqing", // Link Asia/Shanghai Asia/Chongqing
|
||||
"Asia/Chungking", // Link Asia/Shanghai Asia/Chungking
|
||||
"Asia/Dacca", // Link Asia/Dhaka Asia/Dacca
|
||||
"Asia/Harbin", // Link Asia/Shanghai Asia/Harbin
|
||||
"Asia/Kashgar", // Link Asia/Urumqi Asia/Kashgar
|
||||
"Asia/Katmandu", // Link Asia/Kathmandu Asia/Katmandu
|
||||
"Asia/Macao", // Link Asia/Macau Asia/Macao
|
||||
"Asia/Rangoon", // Link Asia/Yangon Asia/Rangoon
|
||||
"Asia/Saigon", // Link Asia/Ho_Chi_Minh Asia/Saigon
|
||||
"Asia/Tel_Aviv", // Link Asia/Jerusalem Asia/Tel_Aviv
|
||||
"Asia/Thimbu", // Link Asia/Thimphu Asia/Thimbu
|
||||
"Asia/Ujung_Pandang", // Link Asia/Makassar Asia/Ujung_Pandang
|
||||
"Asia/Ulan_Bator", // Link Asia/Ulaanbaatar Asia/Ulan_Bator
|
||||
"Atlantic/Faeroe", // Link Atlantic/Faroe Atlantic/Faeroe
|
||||
"Atlantic/Jan_Mayen", // Link Europe/Oslo Atlantic/Jan_Mayen
|
||||
"Australia/ACT", // Link Australia/Sydney Australia/ACT
|
||||
"Australia/Canberra", // Link Australia/Sydney Australia/Canberra
|
||||
"Australia/Currie", // Link Australia/Hobart Australia/Currie
|
||||
"Australia/LHI", // Link Australia/Lord_Howe Australia/LHI
|
||||
"Australia/NSW", // Link Australia/Sydney Australia/NSW
|
||||
"Australia/North", // Link Australia/Darwin Australia/North
|
||||
"Australia/Queensland", // Link Australia/Brisbane Australia/Queensland
|
||||
"Australia/South", // Link Australia/Adelaide Australia/South
|
||||
"Australia/Tasmania", // Link Australia/Hobart Australia/Tasmania
|
||||
"Australia/Victoria", // Link Australia/Melbourne Australia/Victoria
|
||||
"Australia/West", // Link Australia/Perth Australia/West
|
||||
"Australia/Yancowinna", // Link Australia/Broken_Hill Australia/Yancowinna
|
||||
"Brazil/Acre", // Link America/Rio_Branco Brazil/Acre
|
||||
"Brazil/DeNoronha", // Link America/Noronha Brazil/DeNoronha
|
||||
"Brazil/East", // Link America/Sao_Paulo Brazil/East
|
||||
"Brazil/West", // Link America/Manaus Brazil/West
|
||||
"Canada/Atlantic", // Link America/Halifax Canada/Atlantic
|
||||
"Canada/Central", // Link America/Winnipeg Canada/Central
|
||||
"Canada/Eastern", // Link America/Toronto Canada/Eastern
|
||||
"Canada/Mountain", // Link America/Edmonton Canada/Mountain
|
||||
"Canada/Newfoundland", // Link America/St_Johns Canada/Newfoundland
|
||||
"Canada/Pacific", // Link America/Vancouver Canada/Pacific
|
||||
"Canada/Saskatchewan", // Link America/Regina Canada/Saskatchewan
|
||||
"Canada/Yukon", // Link America/Whitehorse Canada/Yukon
|
||||
"Chile/Continental", // Link America/Santiago Chile/Continental
|
||||
"Chile/EasterIsland", // Link Pacific/Easter Chile/EasterIsland
|
||||
"Cuba", // Link America/Havana Cuba
|
||||
"Egypt", // Link Africa/Cairo Egypt
|
||||
"Eire", // Link Europe/Dublin Eire
|
||||
"Etc/UCT", // Link Etc/UTC Etc/UCT
|
||||
"Europe/Belfast", // Link Europe/London Europe/Belfast
|
||||
"Europe/Kiev", // Link Europe/Kyiv Europe/Kiev
|
||||
"Europe/Tiraspol", // Link Europe/Chisinau Europe/Tiraspol
|
||||
"GB", // Link Europe/London GB
|
||||
"GB-Eire", // Link Europe/London GB-Eire
|
||||
"GMT+0", // Link Etc/GMT GMT+0
|
||||
"GMT-0", // Link Etc/GMT GMT-0
|
||||
"GMT0", // Link Etc/GMT GMT0
|
||||
"Greenwich", // Link Etc/GMT Greenwich
|
||||
"Hongkong", // Link Asia/Hong_Kong Hongkong
|
||||
"Iceland", // Link Atlantic/Reykjavik Iceland
|
||||
"Iran", // Link Asia/Tehran Iran
|
||||
"Israel", // Link Asia/Jerusalem Israel
|
||||
"Jamaica", // Link America/Jamaica Jamaica
|
||||
"Japan", // Link Asia/Tokyo Japan
|
||||
"Kwajalein", // Link Pacific/Kwajalein Kwajalein
|
||||
"Libya", // Link Africa/Tripoli Libya
|
||||
"Mexico/BajaNorte", // Link America/Tijuana Mexico/BajaNorte
|
||||
"Mexico/BajaSur", // Link America/Mazatlan Mexico/BajaSur
|
||||
"Mexico/General", // Link America/Mexico_City Mexico/General
|
||||
"NZ", // Link Pacific/Auckland NZ
|
||||
"NZ-CHAT", // Link Pacific/Chatham NZ-CHAT
|
||||
"Navajo", // Link America/Denver Navajo
|
||||
"PRC", // Link Asia/Shanghai PRC
|
||||
"Pacific/Enderbury", // Link Pacific/Kanton Pacific/Enderbury
|
||||
"Pacific/Johnston", // Link Pacific/Honolulu Pacific/Johnston
|
||||
"Pacific/Ponape", // Link Pacific/Pohnpei Pacific/Ponape
|
||||
"Pacific/Samoa", // Link Pacific/Pago_Pago Pacific/Samoa
|
||||
"Pacific/Truk", // Link Pacific/Chuuk Pacific/Truk
|
||||
"Pacific/Yap", // Link Pacific/Chuuk Pacific/Yap
|
||||
"Poland", // Link Europe/Warsaw Poland
|
||||
"Portugal", // Link Europe/Lisbon Portugal
|
||||
"ROC", // Link Asia/Taipei ROC
|
||||
"ROK", // Link Asia/Seoul ROK
|
||||
"Singapore", // Link Asia/Singapore Singapore
|
||||
"Turkey", // Link Europe/Istanbul Turkey
|
||||
"UCT", // Link Etc/UTC UCT
|
||||
"US/Alaska", // Link America/Anchorage US/Alaska
|
||||
"US/Aleutian", // Link America/Adak US/Aleutian
|
||||
"US/Arizona", // Link America/Phoenix US/Arizona
|
||||
"US/Central", // Link America/Chicago US/Central
|
||||
"US/East-Indiana", // Link America/Indiana/Indianapolis US/East-Indiana
|
||||
"US/Eastern", // Link America/New_York US/Eastern
|
||||
"US/Hawaii", // Link Pacific/Honolulu US/Hawaii
|
||||
"US/Indiana-Starke", // Link America/Indiana/Knox US/Indiana-Starke
|
||||
"US/Michigan", // Link America/Detroit US/Michigan
|
||||
"US/Mountain", // Link America/Denver US/Mountain
|
||||
"US/Pacific", // Link America/Los_Angeles US/Pacific
|
||||
"US/Samoa", // Link Pacific/Pago_Pago US/Samoa
|
||||
"UTC", // Link Etc/UTC UTC
|
||||
"Universal", // Link Etc/UTC Universal
|
||||
"W-SU", // Link Europe/Moscow W-SU
|
||||
"Zulu", // Link Etc/UTC Zulu
|
||||
];
|
||||
|
||||
for (let id of testCases) {
|
||||
// Doesn't throw a RangeError.
|
||||
new Temporal.TimeZone(id);
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright (C) 2022 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.timezone
|
||||
description: >
|
||||
TimeZone constructor accepts link names as its input.
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
const testCases = [
|
||||
"Africa/Asmera", // Link Africa/Asmara Africa/Asmera
|
||||
"America/Kralendijk", // Link America/Curacao America/Kralendijk
|
||||
"America/Lower_Princes", // Link America/Curacao America/Lower_Princes
|
||||
"America/Marigot", // Link America/Port_of_Spain America/Marigot
|
||||
"America/St_Barthelemy", // Link America/Port_of_Spain America/St_Barthelemy
|
||||
"America/Virgin", // Link America/St_Thomas America/Virgin
|
||||
"Antarctica/South_Pole", // Link Antarctica/McMurdo Antarctica/South_Pole
|
||||
"Asia/Chungking", // Link Asia/Chongqing Asia/Chungking
|
||||
];
|
||||
|
||||
for (let id of testCases) {
|
||||
// Doesn't throw a RangeError.
|
||||
new Temporal.TimeZone(id);
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
// Copyright (C) 2022 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.timezone
|
||||
description: >
|
||||
TimeZone constructor accepts link names as its input.
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
const testCases = [
|
||||
"GMT", // Link Etc/GMT GMT
|
||||
"Etc/Universal", // Link Etc/UTC Etc/Universal
|
||||
"Etc/Zulu", // Link Etc/UTC Etc/Zulu
|
||||
"Etc/Greenwich", // Link Etc/GMT Etc/Greenwich
|
||||
"Etc/GMT-0", // Link Etc/GMT Etc/GMT-0
|
||||
"Etc/GMT+0", // Link Etc/GMT Etc/GMT+0
|
||||
"Etc/GMT0", // Link Etc/GMT Etc/GMT0
|
||||
];
|
||||
|
||||
for (let id of testCases) {
|
||||
// Doesn't throw a RangeError.
|
||||
new Temporal.TimeZone(id);
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
// Copyright (C) 2022 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.timezone
|
||||
description: >
|
||||
TimeZone constructor accepts link names as its input.
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
const testCases = [
|
||||
"Europe/Jersey", // Link Europe/London Europe/Jersey
|
||||
"Europe/Guernsey", // Link Europe/London Europe/Guernsey
|
||||
"Europe/Isle_of_Man", // Link Europe/London Europe/Isle_of_Man
|
||||
"Europe/Mariehamn", // Link Europe/Helsinki Europe/Mariehamn
|
||||
"Europe/Busingen", // Link Europe/Zurich Europe/Busingen
|
||||
"Europe/Vatican", // Link Europe/Rome Europe/Vatican
|
||||
"Europe/San_Marino", // Link Europe/Rome Europe/San_Marino
|
||||
"Europe/Vaduz", // Link Europe/Zurich Europe/Vaduz
|
||||
"Arctic/Longyearbyen", // Link Europe/Oslo Arctic/Longyearbyen
|
||||
"Europe/Ljubljana", // Link Europe/Belgrade Europe/Ljubljana # Slovenia
|
||||
"Europe/Podgorica", // Link Europe/Belgrade Europe/Podgorica # Montenegro
|
||||
"Europe/Sarajevo", // Link Europe/Belgrade Europe/Sarajevo # Bosnia and Herzegovina
|
||||
"Europe/Skopje", // Link Europe/Belgrade Europe/Skopje # North Macedonia
|
||||
"Europe/Zagreb", // Link Europe/Belgrade Europe/Zagreb # Croatia
|
||||
"Europe/Bratislava", // Link Europe/Prague Europe/Bratislava
|
||||
"Asia/Istanbul", // Link Europe/Istanbul Asia/Istanbul # Istanbul is in both continents.
|
||||
];
|
||||
|
||||
for (let id of testCases) {
|
||||
// Doesn't throw a RangeError.
|
||||
new Temporal.TimeZone(id);
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
// Copyright (C) 2022 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.timezone
|
||||
description: >
|
||||
TimeZone constructor accepts link names as its input.
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
const testCases = [
|
||||
"America/Creston", // Link America/Phoenix America/Creston
|
||||
"America/Nassau", // Link America/Toronto America/Nassau
|
||||
"America/Atikokan", // Link America/Panama America/Atikokan
|
||||
"America/Cayman", // Link America/Panama America/Cayman
|
||||
"America/Anguilla", // Link America/Puerto_Rico America/Anguilla
|
||||
"America/Antigua", // Link America/Puerto_Rico America/Antigua
|
||||
"America/Aruba", // Link America/Puerto_Rico America/Aruba
|
||||
"America/Curacao", // Link America/Puerto_Rico America/Curacao
|
||||
"America/Blanc-Sablon", // Link America/Puerto_Rico America/Blanc-Sablon # Quebec (Lower North Shore)
|
||||
"America/Dominica", // Link America/Puerto_Rico America/Dominica
|
||||
"America/Grenada", // Link America/Puerto_Rico America/Grenada
|
||||
"America/Guadeloupe", // Link America/Puerto_Rico America/Guadeloupe
|
||||
"America/Kralendijk", // Link America/Puerto_Rico America/Kralendijk # Caribbean Netherlands
|
||||
"America/Lower_Princes", // Link America/Puerto_Rico America/Lower_Princes # Sint Maarten
|
||||
"America/Marigot", // Link America/Puerto_Rico America/Marigot # St Martin (French part)
|
||||
"America/Montserrat", // Link America/Puerto_Rico America/Montserrat
|
||||
"America/Port_of_Spain", // Link America/Puerto_Rico America/Port_of_Spain # Trinidad & Tobago
|
||||
"America/St_Barthelemy", // Link America/Puerto_Rico America/St_Barthelemy # St Barthélemy
|
||||
"America/St_Kitts", // Link America/Puerto_Rico America/St_Kitts # St Kitts & Nevis
|
||||
"America/St_Lucia", // Link America/Puerto_Rico America/St_Lucia
|
||||
"America/St_Thomas", // Link America/Puerto_Rico America/St_Thomas # Virgin Islands (US)
|
||||
"America/St_Vincent", // Link America/Puerto_Rico America/St_Vincent
|
||||
"America/Tortola", // Link America/Puerto_Rico America/Tortola # Virgin Islands (UK)
|
||||
];
|
||||
|
||||
for (let id of testCases) {
|
||||
// Doesn't throw a RangeError.
|
||||
new Temporal.TimeZone(id);
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
// Copyright (C) 2022 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.timezone
|
||||
description: >
|
||||
TimeZone constructor canonicalises its input.
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
const testCases = {
|
||||
"Africa/Asmera": "Africa/Asmara",
|
||||
};
|
||||
|
||||
for (let [id, canonical] of Object.entries(testCases)) {
|
||||
let tz = new Temporal.TimeZone(id);
|
||||
|
||||
assert.sameValue(tz.id, canonical);
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
// Copyright (C) 2022 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.timezone
|
||||
description: >
|
||||
TimeZone constructor canonicalises its input.
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
const testCases = {
|
||||
"America/Atka": "America/Adak",
|
||||
"America/Buenos_Aires": "America/Argentina/Buenos_Aires",
|
||||
"America/Catamarca": "America/Argentina/Catamarca",
|
||||
"America/Cordoba": "America/Argentina/Cordoba",
|
||||
"America/Fort_Wayne": "America/Indiana/Indianapolis",
|
||||
"America/Godthab": "America/Nuuk",
|
||||
"America/Indianapolis": "America/Indiana/Indianapolis",
|
||||
"America/Jujuy": "America/Argentina/Jujuy",
|
||||
"America/Knox_IN": "America/Indiana/Knox",
|
||||
"America/Kralendijk": "America/Curacao",
|
||||
"America/Louisville": "America/Kentucky/Louisville",
|
||||
"America/Lower_Princes": "America/Curacao",
|
||||
"America/Marigot": "America/Port_of_Spain",
|
||||
"America/Mendoza": "America/Argentina/Mendoza",
|
||||
"America/Porto_Acre": "America/Rio_Branco",
|
||||
"America/Santa_Isabel": "America/Tijuana",
|
||||
"America/Shiprock": "America/Denver",
|
||||
"America/St_Barthelemy": "America/Port_of_Spain",
|
||||
"America/Virgin": "America/St_Thomas",
|
||||
};
|
||||
|
||||
for (let [id, canonical] of Object.entries(testCases)) {
|
||||
let tz = new Temporal.TimeZone(id);
|
||||
|
||||
assert.sameValue(tz.id, canonical);
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
// Copyright (C) 2022 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.timezone
|
||||
description: >
|
||||
TimeZone constructor canonicalises its input.
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
const testCases = {
|
||||
"Antarctica/South_Pole": "Antarctica/McMurdo",
|
||||
};
|
||||
|
||||
for (let [id, canonical] of Object.entries(testCases)) {
|
||||
let tz = new Temporal.TimeZone(id);
|
||||
|
||||
assert.sameValue(tz.id, canonical);
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
// Copyright (C) 2022 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.timezone
|
||||
description: >
|
||||
TimeZone constructor canonicalises its input.
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
const testCases = {
|
||||
"Arctic/Longyearbyen": "Europe/Oslo",
|
||||
};
|
||||
|
||||
for (let [id, canonical] of Object.entries(testCases)) {
|
||||
let tz = new Temporal.TimeZone(id);
|
||||
|
||||
assert.sameValue(tz.id, canonical);
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
// Copyright (C) 2022 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.timezone
|
||||
description: >
|
||||
TimeZone constructor canonicalises its input.
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
const testCases = {
|
||||
"Asia/Ashkhabad": "Asia/Ashgabat",
|
||||
"Asia/Calcutta": "Asia/Kolkata",
|
||||
"Asia/Chungking": "Asia/Chongqing",
|
||||
"Asia/Dacca": "Asia/Dhaka",
|
||||
"Asia/Istanbul": "Europe/Istanbul",
|
||||
"Asia/Katmandu": "Asia/Kathmandu",
|
||||
"Asia/Macao": "Asia/Macau",
|
||||
"Asia/Rangoon": "Asia/Yangon",
|
||||
"Asia/Saigon": "Asia/Ho_Chi_Minh",
|
||||
"Asia/Thimbu": "Asia/Thimphu",
|
||||
"Asia/Ujung_Pandang": "Asia/Makassar",
|
||||
"Asia/Ulan_Bator": "Asia/Ulaanbaatar",
|
||||
};
|
||||
|
||||
for (let [id, canonical] of Object.entries(testCases)) {
|
||||
let tz = new Temporal.TimeZone(id);
|
||||
|
||||
assert.sameValue(tz.id, canonical);
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
// Copyright (C) 2022 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.timezone
|
||||
description: >
|
||||
TimeZone constructor canonicalises its input.
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
const testCases = {
|
||||
"Atlantic/Faeroe": "Atlantic/Faroe",
|
||||
};
|
||||
|
||||
for (let [id, canonical] of Object.entries(testCases)) {
|
||||
let tz = new Temporal.TimeZone(id);
|
||||
|
||||
assert.sameValue(tz.id, canonical);
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
// Copyright (C) 2022 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.timezone
|
||||
description: >
|
||||
TimeZone constructor canonicalises its input.
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
const testCases = {
|
||||
"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",
|
||||
};
|
||||
|
||||
for (let [id, canonical] of Object.entries(testCases)) {
|
||||
let tz = new Temporal.TimeZone(id);
|
||||
|
||||
assert.sameValue(tz.id, canonical);
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright (C) 2022 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.timezone
|
||||
description: >
|
||||
TimeZone constructor canonicalises its input.
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
const testCases = {
|
||||
"Brazil/Acre": "America/Rio_Branco",
|
||||
"Brazil/DeNoronha": "America/Noronha",
|
||||
"Brazil/East": "America/Sao_Paulo",
|
||||
"Brazil/West": "America/Manaus",
|
||||
};
|
||||
|
||||
for (let [id, canonical] of Object.entries(testCases)) {
|
||||
let tz = new Temporal.TimeZone(id);
|
||||
|
||||
assert.sameValue(tz.id, canonical);
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
// Copyright (C) 2022 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.timezone
|
||||
description: >
|
||||
TimeZone constructor canonicalises its input.
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
const testCases = {
|
||||
"Canada/Atlantic": "America/Halifax",
|
||||
"Canada/Central": "America/Winnipeg",
|
||||
"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",
|
||||
};
|
||||
|
||||
for (let [id, canonical] of Object.entries(testCases)) {
|
||||
let tz = new Temporal.TimeZone(id);
|
||||
|
||||
assert.sameValue(tz.id, canonical);
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright (C) 2022 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.timezone
|
||||
description: >
|
||||
TimeZone constructor canonicalises its input.
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
const testCases = {
|
||||
"Chile/Continental": "America/Santiago",
|
||||
"Chile/EasterIsland": "Pacific/Easter",
|
||||
};
|
||||
|
||||
for (let [id, canonical] of Object.entries(testCases)) {
|
||||
let tz = new Temporal.TimeZone(id);
|
||||
|
||||
assert.sameValue(tz.id, canonical);
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright (C) 2022 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.timezone
|
||||
description: >
|
||||
TimeZone constructor canonicalises its input.
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
const testCases = {
|
||||
"Europe/Bratislava": "Europe/Prague",
|
||||
"Europe/Busingen": "Europe/Zurich",
|
||||
"Europe/Mariehamn": "Europe/Helsinki",
|
||||
"Europe/Nicosia": "Asia/Nicosia",
|
||||
"Europe/Podgorica": "Europe/Belgrade",
|
||||
"Europe/San_Marino": "Europe/Rome",
|
||||
"Europe/Vatican": "Europe/Rome",
|
||||
};
|
||||
|
||||
for (let [id, canonical] of Object.entries(testCases)) {
|
||||
let tz = new Temporal.TimeZone(id);
|
||||
|
||||
assert.sameValue(tz.id, canonical);
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
// Copyright (C) 2022 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.timezone
|
||||
description: >
|
||||
TimeZone constructor canonicalises its input.
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
const testCases = {
|
||||
"Mexico/BajaNorte": "America/Tijuana",
|
||||
"Mexico/BajaSur": "America/Mazatlan",
|
||||
"Mexico/General": "America/Mexico_City",
|
||||
};
|
||||
|
||||
for (let [id, canonical] of Object.entries(testCases)) {
|
||||
let tz = new Temporal.TimeZone(id);
|
||||
|
||||
assert.sameValue(tz.id, canonical);
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright (C) 2022 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.timezone
|
||||
description: >
|
||||
TimeZone constructor canonicalises its input.
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
const testCases = {
|
||||
"Pacific/Ponape": "Pacific/Pohnpei",
|
||||
"Pacific/Samoa": "Pacific/Pago_Pago",
|
||||
"Pacific/Truk": "Pacific/Chuuk",
|
||||
"Pacific/Yap": "Pacific/Chuuk",
|
||||
};
|
||||
|
||||
for (let [id, canonical] of Object.entries(testCases)) {
|
||||
let tz = new Temporal.TimeZone(id);
|
||||
|
||||
assert.sameValue(tz.id, canonical);
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
// Copyright (C) 2022 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.timezone
|
||||
description: >
|
||||
TimeZone constructor canonicalises its input.
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
const testCases = {
|
||||
"US/Alaska": "America/Anchorage",
|
||||
"US/Aleutian": "America/Adak",
|
||||
"US/Arizona": "America/Phoenix",
|
||||
"US/Central": "America/Chicago",
|
||||
"US/East-Indiana": "America/Indiana/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/Samoa": "Pacific/Pago_Pago",
|
||||
};
|
||||
|
||||
for (let [id, canonical] of Object.entries(testCases)) {
|
||||
let tz = new Temporal.TimeZone(id);
|
||||
|
||||
assert.sameValue(tz.id, canonical);
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
// Copyright (C) 2022 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.timezone
|
||||
description: >
|
||||
TimeZone constructor canonicalises its input.
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
const testCases = {
|
||||
"Cuba": "America/Havana",
|
||||
"Egypt": "Africa/Cairo",
|
||||
"Eire": "Europe/Dublin",
|
||||
"GB": "Europe/London",
|
||||
"GB-Eire": "Europe/London",
|
||||
"GMT": "UTC",
|
||||
"GMT0": "UTC",
|
||||
"GMT+0": "UTC",
|
||||
"GMT-0": "UTC",
|
||||
"Greenwich": "UTC",
|
||||
"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",
|
||||
"NZ": "Pacific/Auckland",
|
||||
"NZ-CHAT": "Pacific/Chatham",
|
||||
"Navajo": "America/Denver",
|
||||
"PRC": "Asia/Shanghai",
|
||||
"Poland": "Europe/Warsaw",
|
||||
"Portugal": "Europe/Lisbon",
|
||||
"ROC": "Asia/Taipei",
|
||||
"ROK": "Asia/Seoul",
|
||||
"Singapore": "Asia/Singapore",
|
||||
"Turkey": "Europe/Istanbul",
|
||||
"UCT": "UTC",
|
||||
"Universal": "UTC",
|
||||
"W-SU": "Europe/Moscow",
|
||||
"Zulu": "UTC",
|
||||
};
|
||||
|
||||
for (let [id, canonical] of Object.entries(testCases)) {
|
||||
let tz = new Temporal.TimeZone(id);
|
||||
|
||||
assert.sameValue(tz.id, canonical);
|
||||
}
|
Loading…
Reference in New Issue