tor-browser

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

bigint-and-non-finite.js (1839B)


      1 // Copyright (C) 2017 Josh Wolfe. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 description: Strict inequality comparison of BigInt and non-finite Number values
      5 esid: sec-strict-equality-comparison
      6 info: |
      7  1. If Type(x) is different from Type(y), return false.
      8 
      9 features: [BigInt]
     10 ---*/
     11 assert.sameValue(0n !== Infinity, true, 'The result of (0n !== Infinity) is true');
     12 assert.sameValue(Infinity !== 0n, true, 'The result of (Infinity !== 0n) is true');
     13 assert.sameValue(1n !== Infinity, true, 'The result of (1n !== Infinity) is true');
     14 assert.sameValue(Infinity !== 1n, true, 'The result of (Infinity !== 1n) is true');
     15 assert.sameValue(-1n !== Infinity, true, 'The result of (-1n !== Infinity) is true');
     16 assert.sameValue(Infinity !== -1n, true, 'The result of (Infinity !== -1n) is true');
     17 assert.sameValue(0n !== -Infinity, true, 'The result of (0n !== -Infinity) is true');
     18 assert.sameValue(-Infinity !== 0n, true, 'The result of (-Infinity !== 0n) is true');
     19 assert.sameValue(1n !== -Infinity, true, 'The result of (1n !== -Infinity) is true');
     20 assert.sameValue(-Infinity !== 1n, true, 'The result of (-Infinity !== 1n) is true');
     21 assert.sameValue(-1n !== -Infinity, true, 'The result of (-1n !== -Infinity) is true');
     22 assert.sameValue(-Infinity !== -1n, true, 'The result of (-Infinity !== -1n) is true');
     23 assert.sameValue(0n !== NaN, true, 'The result of (0n !== NaN) is true');
     24 assert.sameValue(NaN !== 0n, true, 'The result of (NaN !== 0n) is true');
     25 assert.sameValue(1n !== NaN, true, 'The result of (1n !== NaN) is true');
     26 assert.sameValue(NaN !== 1n, true, 'The result of (NaN !== 1n) is true');
     27 assert.sameValue(-1n !== NaN, true, 'The result of (-1n !== NaN) is true');
     28 assert.sameValue(NaN !== -1n, true, 'The result of (NaN !== -1n) is true');
     29 
     30 reportCompare(0, 0);