Debian Codegraph @

js/src/tests/test262/built-ins/Temporal/PlainDateTime/microsecond-undefined.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) 2021 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: Microsecond argument defaults to 0 if not given
8 features: [Temporal]
9 includes: [temporalHelpers.js]
10 ---*/
11
12 const args = [2000, 5, 2, 12, 34, 56, 123];
13
14 TemporalHelpers.assertPlainDateTime(
15 new Temporal.PlainDateTime(...args, undefined),
16 2000, 5, "M05", 2, 12, 34, 56, 123, 0, 0,
17 "microsecond default argument (argument present)"
18 );
19
20 TemporalHelpers.assertPlainDateTime(
21 new Temporal.PlainDateTime(...args),
22 2000, 5, "M05", 2, 12, 34, 56, 123, 0, 0,
23 "microsecond default argument (argument missing)"
24 );
25
26
27 reportCompare(0, 0);