From d7a10658d9e2c6b33ca74687bba5002a6b943d4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bargull?= Date: Wed, 27 Jul 2022 15:21:59 +0200 Subject: [PATCH] Replace time zone link name canonicalisation tests Replace tests with more simple tests that only ensure link names are accepted. --- .../intl402/Temporal/TimeZone/links-africa.js | 54 +++++++ test/intl402/Temporal/TimeZone/links-asia.js | 25 ++++ .../Temporal/TimeZone/links-australasia.js | 21 +++ .../Temporal/TimeZone/links-backward.js | 140 ++++++++++++++++++ .../Temporal/TimeZone/links-backzone.js | 25 ++++ .../Temporal/TimeZone/links-etcetera.js | 24 +++ .../intl402/Temporal/TimeZone/links-europe.js | 33 +++++ .../Temporal/TimeZone/links-northamerica.js | 40 +++++ .../Temporal/TimeZone/non-canonical-africa.js | 19 --- .../TimeZone/non-canonical-america.js | 37 ----- .../TimeZone/non-canonical-antarctica.js | 19 --- .../Temporal/TimeZone/non-canonical-arctic.js | 19 --- .../Temporal/TimeZone/non-canonical-asia.js | 30 ---- .../TimeZone/non-canonical-atlantic.js | 19 --- .../TimeZone/non-canonical-australia.js | 29 ---- .../Temporal/TimeZone/non-canonical-brazil.js | 22 --- .../Temporal/TimeZone/non-canonical-canada.js | 26 ---- .../Temporal/TimeZone/non-canonical-chile.js | 20 --- .../Temporal/TimeZone/non-canonical-europe.js | 25 ---- .../Temporal/TimeZone/non-canonical-mexico.js | 21 --- .../TimeZone/non-canonical-pacific.js | 22 --- .../Temporal/TimeZone/non-canonical-us.js | 30 ---- .../Temporal/TimeZone/non-canonical.js | 50 ------- 23 files changed, 362 insertions(+), 388 deletions(-) create mode 100644 test/intl402/Temporal/TimeZone/links-africa.js create mode 100644 test/intl402/Temporal/TimeZone/links-asia.js create mode 100644 test/intl402/Temporal/TimeZone/links-australasia.js create mode 100644 test/intl402/Temporal/TimeZone/links-backward.js create mode 100644 test/intl402/Temporal/TimeZone/links-backzone.js create mode 100644 test/intl402/Temporal/TimeZone/links-etcetera.js create mode 100644 test/intl402/Temporal/TimeZone/links-europe.js create mode 100644 test/intl402/Temporal/TimeZone/links-northamerica.js delete mode 100644 test/intl402/Temporal/TimeZone/non-canonical-africa.js delete mode 100644 test/intl402/Temporal/TimeZone/non-canonical-america.js delete mode 100644 test/intl402/Temporal/TimeZone/non-canonical-antarctica.js delete mode 100644 test/intl402/Temporal/TimeZone/non-canonical-arctic.js delete mode 100644 test/intl402/Temporal/TimeZone/non-canonical-asia.js delete mode 100644 test/intl402/Temporal/TimeZone/non-canonical-atlantic.js delete mode 100644 test/intl402/Temporal/TimeZone/non-canonical-australia.js delete mode 100644 test/intl402/Temporal/TimeZone/non-canonical-brazil.js delete mode 100644 test/intl402/Temporal/TimeZone/non-canonical-canada.js delete mode 100644 test/intl402/Temporal/TimeZone/non-canonical-chile.js delete mode 100644 test/intl402/Temporal/TimeZone/non-canonical-europe.js delete mode 100644 test/intl402/Temporal/TimeZone/non-canonical-mexico.js delete mode 100644 test/intl402/Temporal/TimeZone/non-canonical-pacific.js delete mode 100644 test/intl402/Temporal/TimeZone/non-canonical-us.js delete mode 100644 test/intl402/Temporal/TimeZone/non-canonical.js diff --git a/test/intl402/Temporal/TimeZone/links-africa.js b/test/intl402/Temporal/TimeZone/links-africa.js new file mode 100644 index 0000000000..f5ae79b2b7 --- /dev/null +++ b/test/intl402/Temporal/TimeZone/links-africa.js @@ -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); +} diff --git a/test/intl402/Temporal/TimeZone/links-asia.js b/test/intl402/Temporal/TimeZone/links-asia.js new file mode 100644 index 0000000000..c2b2112d80 --- /dev/null +++ b/test/intl402/Temporal/TimeZone/links-asia.js @@ -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); +} diff --git a/test/intl402/Temporal/TimeZone/links-australasia.js b/test/intl402/Temporal/TimeZone/links-australasia.js new file mode 100644 index 0000000000..9717b8606d --- /dev/null +++ b/test/intl402/Temporal/TimeZone/links-australasia.js @@ -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); +} diff --git a/test/intl402/Temporal/TimeZone/links-backward.js b/test/intl402/Temporal/TimeZone/links-backward.js new file mode 100644 index 0000000000..db4a8b7897 --- /dev/null +++ b/test/intl402/Temporal/TimeZone/links-backward.js @@ -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); +} diff --git a/test/intl402/Temporal/TimeZone/links-backzone.js b/test/intl402/Temporal/TimeZone/links-backzone.js new file mode 100644 index 0000000000..4a1643b7b7 --- /dev/null +++ b/test/intl402/Temporal/TimeZone/links-backzone.js @@ -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); +} diff --git a/test/intl402/Temporal/TimeZone/links-etcetera.js b/test/intl402/Temporal/TimeZone/links-etcetera.js new file mode 100644 index 0000000000..9f654e37a4 --- /dev/null +++ b/test/intl402/Temporal/TimeZone/links-etcetera.js @@ -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); +} diff --git a/test/intl402/Temporal/TimeZone/links-europe.js b/test/intl402/Temporal/TimeZone/links-europe.js new file mode 100644 index 0000000000..8e92b88024 --- /dev/null +++ b/test/intl402/Temporal/TimeZone/links-europe.js @@ -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); +} diff --git a/test/intl402/Temporal/TimeZone/links-northamerica.js b/test/intl402/Temporal/TimeZone/links-northamerica.js new file mode 100644 index 0000000000..bbe764b885 --- /dev/null +++ b/test/intl402/Temporal/TimeZone/links-northamerica.js @@ -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); +} diff --git a/test/intl402/Temporal/TimeZone/non-canonical-africa.js b/test/intl402/Temporal/TimeZone/non-canonical-africa.js deleted file mode 100644 index d9e7579b07..0000000000 --- a/test/intl402/Temporal/TimeZone/non-canonical-africa.js +++ /dev/null @@ -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); -} diff --git a/test/intl402/Temporal/TimeZone/non-canonical-america.js b/test/intl402/Temporal/TimeZone/non-canonical-america.js deleted file mode 100644 index edd3f32983..0000000000 --- a/test/intl402/Temporal/TimeZone/non-canonical-america.js +++ /dev/null @@ -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); -} diff --git a/test/intl402/Temporal/TimeZone/non-canonical-antarctica.js b/test/intl402/Temporal/TimeZone/non-canonical-antarctica.js deleted file mode 100644 index 0717d17157..0000000000 --- a/test/intl402/Temporal/TimeZone/non-canonical-antarctica.js +++ /dev/null @@ -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); -} diff --git a/test/intl402/Temporal/TimeZone/non-canonical-arctic.js b/test/intl402/Temporal/TimeZone/non-canonical-arctic.js deleted file mode 100644 index 2f3abe8250..0000000000 --- a/test/intl402/Temporal/TimeZone/non-canonical-arctic.js +++ /dev/null @@ -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); -} diff --git a/test/intl402/Temporal/TimeZone/non-canonical-asia.js b/test/intl402/Temporal/TimeZone/non-canonical-asia.js deleted file mode 100644 index 7988ecb49f..0000000000 --- a/test/intl402/Temporal/TimeZone/non-canonical-asia.js +++ /dev/null @@ -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); -} diff --git a/test/intl402/Temporal/TimeZone/non-canonical-atlantic.js b/test/intl402/Temporal/TimeZone/non-canonical-atlantic.js deleted file mode 100644 index 5b2634b174..0000000000 --- a/test/intl402/Temporal/TimeZone/non-canonical-atlantic.js +++ /dev/null @@ -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); -} diff --git a/test/intl402/Temporal/TimeZone/non-canonical-australia.js b/test/intl402/Temporal/TimeZone/non-canonical-australia.js deleted file mode 100644 index 9c5355a6a3..0000000000 --- a/test/intl402/Temporal/TimeZone/non-canonical-australia.js +++ /dev/null @@ -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); -} diff --git a/test/intl402/Temporal/TimeZone/non-canonical-brazil.js b/test/intl402/Temporal/TimeZone/non-canonical-brazil.js deleted file mode 100644 index 2fcc3f54bf..0000000000 --- a/test/intl402/Temporal/TimeZone/non-canonical-brazil.js +++ /dev/null @@ -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); -} diff --git a/test/intl402/Temporal/TimeZone/non-canonical-canada.js b/test/intl402/Temporal/TimeZone/non-canonical-canada.js deleted file mode 100644 index d34a98684e..0000000000 --- a/test/intl402/Temporal/TimeZone/non-canonical-canada.js +++ /dev/null @@ -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); -} diff --git a/test/intl402/Temporal/TimeZone/non-canonical-chile.js b/test/intl402/Temporal/TimeZone/non-canonical-chile.js deleted file mode 100644 index 4636d2dea4..0000000000 --- a/test/intl402/Temporal/TimeZone/non-canonical-chile.js +++ /dev/null @@ -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); -} diff --git a/test/intl402/Temporal/TimeZone/non-canonical-europe.js b/test/intl402/Temporal/TimeZone/non-canonical-europe.js deleted file mode 100644 index e24d044707..0000000000 --- a/test/intl402/Temporal/TimeZone/non-canonical-europe.js +++ /dev/null @@ -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); -} diff --git a/test/intl402/Temporal/TimeZone/non-canonical-mexico.js b/test/intl402/Temporal/TimeZone/non-canonical-mexico.js deleted file mode 100644 index e52375335a..0000000000 --- a/test/intl402/Temporal/TimeZone/non-canonical-mexico.js +++ /dev/null @@ -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); -} diff --git a/test/intl402/Temporal/TimeZone/non-canonical-pacific.js b/test/intl402/Temporal/TimeZone/non-canonical-pacific.js deleted file mode 100644 index 8987db9dd1..0000000000 --- a/test/intl402/Temporal/TimeZone/non-canonical-pacific.js +++ /dev/null @@ -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); -} diff --git a/test/intl402/Temporal/TimeZone/non-canonical-us.js b/test/intl402/Temporal/TimeZone/non-canonical-us.js deleted file mode 100644 index 6399f65b12..0000000000 --- a/test/intl402/Temporal/TimeZone/non-canonical-us.js +++ /dev/null @@ -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); -} diff --git a/test/intl402/Temporal/TimeZone/non-canonical.js b/test/intl402/Temporal/TimeZone/non-canonical.js deleted file mode 100644 index 45430c1c5b..0000000000 --- a/test/intl402/Temporal/TimeZone/non-canonical.js +++ /dev/null @@ -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); -}