tor-browser

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

S15.1.2.2_A2_T1.js (1069B)


      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 :: TAB (U+0009)"
      8 ---*/
      9 
     10 assert.sameValue(parseInt("\u00091"), parseInt("1"), 'parseInt("\\u00091") must return the same value returned by parseInt("1")');
     11 
     12 assert.sameValue(parseInt("\u0009\u0009-1"), parseInt("-1"), 'parseInt("\\u0009\\u0009-1") must return the same value returned by parseInt("-1")');
     13 
     14 assert.sameValue(parseInt("	1"), parseInt("1"), 'parseInt(" 1") must return the same value returned by parseInt("1")');
     15 
     16 assert.sameValue(parseInt("			1"), parseInt("1"), 'parseInt(" 1") must return the same value returned by parseInt("1")');
     17 
     18 assert.sameValue(
     19  parseInt("			\u0009			\u0009-1"),
     20  parseInt("-1"),
     21  'parseInt(" \\u0009 \\u0009-1") must return the same value returned by parseInt("-1")'
     22 );
     23 
     24 assert.sameValue(parseInt("\u0009"), NaN, 'parseInt("\\u0009") must return NaN');
     25 
     26 reportCompare(0, 0);