Debian Codegraph @

js/src/tests/test262/intl402/Temporal/ZonedDateTime/links-backzone.js

raw
1 // |reftest| shell-option(--enable-temporal) skip-if(!this.hasOwnProperty('Temporal')||!xulRuntime.shell) -- Temporal is not enabled unconditionally, requires shell-options
2 // Copyright (C) 2022 André Bargull. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4
5 /*---
6 esid: sec-temporal.zoneddatetime
7 description: ZonedDateTime constructor accepts link names as time zone ID input
8 features: [Temporal, canonical-tz]
9 ---*/
10
11 const testCases = [
12 "Africa/Asmera", // Link Africa/Asmara Africa/Asmera
13 "America/Kralendijk", // Link America/Curacao America/Kralendijk
14 "America/Lower_Princes", // Link America/Curacao America/Lower_Princes
15 "America/Marigot", // Link America/Port_of_Spain America/Marigot
16 "America/St_Barthelemy", // Link America/Port_of_Spain America/St_Barthelemy
17 "America/Virgin", // Link America/St_Thomas America/Virgin
18 "Antarctica/South_Pole", // Link Antarctica/McMurdo Antarctica/South_Pole
19 "Asia/Chungking", // Link Asia/Chongqing Asia/Chungking
20 ];
21
22 for (let id of testCases) {
23 const instance = new Temporal.ZonedDateTime(0n, id);
24 assert.sameValue(instance.timeZoneId, id);
25 }
26
27 reportCompare(0, 0);