tor-browser

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

lower-limit.js (938B)


      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.duration.from
      7 description: Minimum value is zero.
      8 includes: [temporalHelpers.js]
      9 features: [Temporal]
     10 ---*/
     11 
     12 const units = [
     13  "years",
     14  "months",
     15  "weeks",
     16  "days",
     17  "hours",
     18  "minutes",
     19  "seconds",
     20  "milliseconds",
     21  "microseconds",
     22  "nanoseconds"
     23 ];
     24 
     25 units.forEach(unit => TemporalHelpers.assertDuration(Temporal.Duration.from({ [unit]: 0 }),
     26                                                     0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
     27 
     28 [
     29  "P0Y",
     30  "P0M",
     31  "P0W",
     32  "P0D",
     33  "PT0H",
     34  "PT0M",
     35  "PT0S"
     36 ].forEach(str => TemporalHelpers.assertDuration(Temporal.Duration.from(str),
     37                                                0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
     38 
     39 reportCompare(0, 0);