S15.1.2.3_A2_T3.js (741B)
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 :: NBSB (U+00A0)" 8 ---*/ 9 10 //CHECK#1 11 if (parseFloat("\u00A01.1") !== parseFloat("1.1")) { 12 throw new Test262Error('#1: parseFloat("\\u00A01.1") === parseFloat("1.1"). Actual: ' + (parseFloat("\u00A01.1"))); 13 } 14 15 //CHECK#2 16 if (parseFloat("\u00A0\u00A0-1.1") !== parseFloat("-1.1")) { 17 throw new Test262Error('#2: parseFloat("\\u00A0\\u00A0-1.1") === parseFloat("-1.1"). Actual: ' + (parseFloat("\u00A0\u00A0-1.1"))); 18 } 19 20 //CHECK#3 21 assert.sameValue(parseFloat("\u00A0"), NaN); 22 23 reportCompare(0, 0);