tor-browser

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

S15.1.2.3_A2_T1.js (1320B)


      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-parsefloat-string
      7 description: "StrWhiteSpaceChar :: TAB (U+0009)"
      8 ---*/
      9 
     10 //CHECK#1
     11 if (parseFloat("\u00091.1") !== parseFloat("1.1")) {
     12  throw new Test262Error('#1: parseFloat("\\u00091.1") === parseFloat("1.1"). Actual: ' + (parseFloat("\u00091.1")));
     13 }
     14 
     15 //CHECK#2
     16 if (parseFloat("\u0009\u0009-1.1") !== parseFloat("-1.1")) {
     17  throw new Test262Error('#2: parseFloat("\\u0009\\u0009-1.1") === parseFloat("-1.1"). Actual: ' + (parseFloat("\u0009\u0009-1.1")));
     18 }
     19 
     20 //CHECK#3
     21 if (parseFloat("	1.1") !== parseFloat("1.1")) {
     22  throw new Test262Error('#3: parseFloat("	1.1") === parseFloat("1.1"). Actual: ' + (parseFloat("	1.1")));
     23 }
     24 
     25 //CHECK#4
     26 if (parseFloat("			1.1") !== parseFloat("1.1")) {
     27  throw new Test262Error('#4: parseFloat("			1.1") === parseFloat("1.1"). Actual: ' + (parseFloat("			1.1")));
     28 }
     29 
     30 //CHECK#5
     31 if (parseFloat("			\u0009			\u0009-1.1") !== parseFloat("-1.1")) {
     32  throw new Test262Error('#5: parseFloat("			\\u0009			\\u0009-1.1") === parseFloat("-1.1"). Actual: ' + (parseFloat("			\u0009			\u0009-1.1")));
     33 }
     34 
     35 //CHECK#6
     36 assert.sameValue(parseFloat("\u0009"), NaN, "'\u0009'");
     37 
     38 reportCompare(0, 0);