tor-browser

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

exhaustive.js (787B)


      1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
      2 // Copyright (C) 2023 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.instant.compare
      7 description: Tests for compare() with each possible outcome
      8 features: [Temporal]
      9 ---*/
     10 
     11 assert.sameValue(
     12  Temporal.Instant.compare(new Temporal.Instant(1_000_000_000_000_000_000n), new Temporal.Instant(500_000_000_000_000_000n)),
     13  1,
     14  ">"
     15 );
     16 assert.sameValue(
     17  Temporal.Instant.compare(new Temporal.Instant(-1000n), new Temporal.Instant(1000n)),
     18  -1,
     19  "<"
     20 );
     21 assert.sameValue(
     22  Temporal.Instant.compare(new Temporal.Instant(123_456_789n), new Temporal.Instant(123_456_789n)),
     23  0,
     24  "="
     25 );
     26 
     27 reportCompare(0, 0);