Debian Codegraph @

js/src/tests/test262/built-ins/parseFloat/S15.1.2.3_A5_T1.js

raw
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: Return the number value for the MV of Result(4)
6 esid: sec-parsefloat-string
7 description: Checking Infinity
8 ---*/
9
10 //CHECK#1
11 if (parseFloat("Infinity") !== Number.POSITIVE_INFINITY) {
12 throw new Test262Error('#1: parseFloat("Infinity") === Number.POSITIVE_INFINITY. Actual: ' + (parseFloat("Infinity")));
13 }
14
15 //CHECK#2
16 if (parseFloat("+Infinity") !== Number.POSITIVE_INFINITY) {
17 throw new Test262Error('#2: parseFloat("+Infinity") === Number.POSITIVE_INFINITY. Actual: ' + (parseFloat("+Infinity")));
18 }
19
20 //CHECK#3
21 if (parseFloat("-Infinity") !== Number.NEGATIVE_INFINITY) {
22 throw new Test262Error('#3: parseFloat("-Infinity") === Number.NEGATIVE_INFINITY. Actual: ' + (parseFloat("-Infinity")));
23 }
24
25 reportCompare(0, 0);