large-bigint.js (594B)
1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally 2 // Copyright (C) 2024 André Bargull. All rights reserved. 3 // This code is governed by the BSD license found in the LICENSE file. 4 5 /*--- 6 esid: sec-temporal.instant 7 description: > 8 Throws a RangeError if the input is far away from the epoch nanoseconds limits. 9 features: [Temporal] 10 ---*/ 11 12 assert.throws( 13 RangeError, 14 () => new Temporal.Instant(2n ** 128n), 15 "2n ** 128n" 16 ); 17 18 assert.throws( 19 RangeError, 20 () => new Temporal.Instant(-(2n ** 128n)), 21 "-(2n ** 128n)" 22 ); 23 24 reportCompare(0, 0);