summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/intl402/Temporal/TimeZone/links-etcetera.js
blob: e67c2bea7a3aea49906db0ffd15d3e5f84f1f195 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
// 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) {
  const tz = new Temporal.TimeZone(id);
  assert.sameValue(tz.id, id);
}

reportCompare(0, 0);