Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / Temporal / PlainMonthDay / prototype / equals / argument-string-time-zone-annotation.js
blob29cfc962a09948ca4711b6b4b5720e512d58dff9
1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
2 // Copyright (C) 2022 Igalia, S.L. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
5 /*---
6 esid: sec-temporal.plainmonthday.prototype.equals
7 description: Various forms of time zone annotation; critical flag has no effect
8 features: [Temporal]
9 ---*/
11 const tests = [
12   ["1976-05-02T15:23[Asia/Kolkata]", "named, with no offset"],
13   ["1976-05-02T15:23[!Europe/Vienna]", "named, with ! and no offset"],
14   ["1976-05-02T15:23[+00:00]", "numeric, with no offset"],
15   ["1976-05-02T15:23[!-02:30]", "numeric, with ! and no offset"],
16   ["1976-05-02T15:23+00:00[UTC]", "named, with offset"],
17   ["1976-05-02T15:23+00:00[!Africa/Abidjan]", "named, with offset and !"],
18   ["1976-05-02T15:23+00:00[+01:00]", "numeric, with offset"],
19   ["1976-05-02T15:23+00:00[!-08:00]", "numeric, with offset and !"],
22 const instance = new Temporal.PlainMonthDay(5, 2);
24 tests.forEach(([arg, description]) => {
25   const result = instance.equals(arg);
27   assert.sameValue(
28     result,
29     true,
30     `time zone annotation (${description})`
31   );
32 });
34 reportCompare(0, 0);