tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

limits.js (871B)


      1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
      2 // Copyright (C) 2018 Bloomberg LP. 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: Min/max range.
      8 includes: [temporalHelpers.js]
      9 features: [Temporal]
     10 ---*/
     11 
     12 
     13 // constructing from ns
     14 var limit = 8640000000000000000000n;
     15 assert.throws(RangeError, () => new Temporal.Instant(-limit - 1n));
     16 assert.throws(RangeError, () => new Temporal.Instant(limit + 1n));
     17 TemporalHelpers.assertInstantsEqual(new Temporal.Instant(-limit),
     18                                    Temporal.Instant.from("-271821-04-20T00:00:00Z"));
     19 TemporalHelpers.assertInstantsEqual(new Temporal.Instant(limit),
     20                                    Temporal.Instant.from("+275760-09-13T00:00:00Z"));
     21 
     22 reportCompare(0, 0);