tor-browser

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

trunc-specialVals.js (755B)


      1 // Copyright 2015 Microsoft Corporation. All rights reserved.
      2 // This code is governed by the license found in the LICENSE file.
      3 
      4 /*---
      5 description: Math.trunc with sample values.
      6 es6id: 20.2.2.35
      7 ---*/
      8 
      9 assert.sameValue(Math.trunc(Number.NEGATIVE_INFINITY), Number.NEGATIVE_INFINITY,
     10  "Math.trunc should produce negative infinity for Number.NEGATIVE_INFINITY");
     11 assert.sameValue(Math.trunc(Number.POSITIVE_INFINITY), Number.POSITIVE_INFINITY,
     12  "Math.trunc should produce positive infinity for Number.POSITIVE_INFINITY");
     13 assert.sameValue(1 / Math.trunc(-0), Number.NEGATIVE_INFINITY,
     14  "Math.trunc should produce -0 for -0");
     15 assert.sameValue(1 / Math.trunc(0), Number.POSITIVE_INFINITY,
     16  "Math.trunc should produce +0 for +0");
     17 
     18 reportCompare(0, 0);