Debian Codegraph @

js/src/tests/test262/built-ins/Temporal/PlainDateTime/constructor-full.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 Igalia, S.L. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4
5 /*---
6 esid: sec-temporal.plaindatetime
7 description: Checking an explicitly constructed instance with all arguments
8 features: [Temporal]
9 includes: [temporalHelpers.js]
10 ---*/
11
12 const datetime = new Temporal.PlainDateTime(1976, 11, 18, 15, 23, 30, 123, 456, 789, "iso8601");
13
14 TemporalHelpers.assertPlainDateTime(datetime,
15 1976, 11, "M11", 18, 15, 23, 30, 123, 456, 789,
16 "check instance (all arguments supplied)"
17 );
18
19 assert.sameValue(
20 datetime.calendarId,
21 "iso8601",
22 "calendar supplied in constructor can be extracted and is unchanged"
23 );
24
25 reportCompare(0, 0);