call-builtin.js (683B)
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: Constructor should not call built-in functions. 8 includes: [temporalHelpers.js] 9 features: [Temporal] 10 ---*/ 11 12 Number.isFinite = () => { throw new Test262Error("should not call Number.isFinite") }; 13 Math.sign = () => { throw new Test262Error("should not call Math.sign") }; 14 15 const duration = new Temporal.Duration(1, 1); 16 TemporalHelpers.assertDuration(duration, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0); 17 18 reportCompare(0, 0);