|
1 // Any copyright is dedicated to the Public Domain. |
|
2 // http://creativecommons.org/licenses/publicdomain/ |
|
3 |
|
4 //----------------------------------------------------------------------------- |
|
5 var BUGNUMBER = 886949; |
|
6 var summary = "ES6 (draft May 2013) 15.7.3.10 Number.parseFloat(string)"; |
|
7 |
|
8 print(BUGNUMBER + ": " + summary); |
|
9 |
|
10 assertEq(Number.parseFloat("Infinity"), Infinity); |
|
11 assertEq(Number.parseFloat("+Infinity"), Infinity); |
|
12 assertEq(Number.parseFloat("-Infinity"), -Infinity); |
|
13 |
|
14 assertEq(Number.parseFloat("inf"), NaN); |
|
15 assertEq(Number.parseFloat("Inf"), NaN); |
|
16 assertEq(Number.parseFloat("infinity"), NaN); |
|
17 |
|
18 assertEq(Number.parseFloat("nan"), NaN); |
|
19 assertEq(Number.parseFloat("NaN"), NaN); |
|
20 |
|
21 if (typeof reportCompare === "function") |
|
22 reportCompare(true, true); |
|
23 |
|
24 print("All tests passed!"); |