basic.js (799B)
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. 4 5 /*--- 6 esid: sec-temporal.duration 7 description: Basic constructor tests. 8 includes: [temporalHelpers.js] 9 features: [Temporal] 10 ---*/ 11 12 TemporalHelpers.assertDuration(new Temporal.Duration(5, 5, 5, 5, 5, 5, 5, 5, 5, 0), 13 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, "positive"); 14 TemporalHelpers.assertDuration(new Temporal.Duration(-5, -5, -5, -5, -5, -5, -5, -5, -5, 0), 15 -5, -5, -5, -5, -5, -5, -5, -5, -5, 0, "negative"); 16 TemporalHelpers.assertDuration(new Temporal.Duration(-0, -0, -0, -0, -0, -0, -0, -0, -0, -0), 17 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "negative zero"); 18 19 reportCompare(0, 0);