tor-browser

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

S15.1.2.2_A2_T10.js (1114B)


      1 // Copyright 2009 the Sputnik authors.  All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 info: Operator remove leading StrWhiteSpaceChar
      6 esid: sec-parseint-string-radix
      7 description: "StrWhiteSpaceChar :: USP"
      8 ---*/
      9 
     10 var uspU = ["\u1680", "\u2000", "\u2001", "\u2002", "\u2003", "\u2004", "\u2005", "\u2006", "\u2007", "\u2008", "\u2009", "\u200A", "\u202F", "\u205F", "\u3000"];
     11 var uspS = ["1680", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "200A", "202F", "205F", "3000"];
     12 
     13 for (var index = 0; index < uspU.length; index++) {
     14  assert.sameValue(
     15    parseInt(uspU[index] + "1"),
     16    parseInt("1"),
     17    'parseInt(uspU[index] + "1") must return the same value returned by parseInt("1")'
     18  );
     19 
     20  assert.sameValue(
     21    parseInt(uspU[index] + uspU[index] + uspU[index] + "1"),
     22    parseInt("1"),
     23    'parseInt(uspU[index] + uspU[index] + uspU[index] + "1") must return the same value returned by parseInt("1")'
     24  );
     25 
     26  let n = parseInt(uspU[index]);
     27  assert(n !== n, 'The result of `(n !== n)` is true');
     28 }
     29 
     30 reportCompare(0, 0);