microsecond-undefined.js (815B)
1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally 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);