| 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: | |
| 6 |
Compute the longest prefix of Result(2), which might be Result(2) itself, |
| 7 |
which satisfies the syntax of a StrDecimalLiteral |
| 8 |
es5id: 15.1.2.3_A4_T4 |
| 9 |
es6id: 18.2.4 |
| 10 |
esid: sec-parsefloat-string |
| 11 |
description: "\"Infinity\"+\"some string\"" |
| 12 |
---*/ |
| 13 |
|
| 14 |
//CHECK#1 |
| 15 |
if (parseFloat("Infinity1") !== Number.POSITIVE_INFINITY) { |
| 16 |
$ERROR('#1: parseFloat("Infinity1") === Number.POSITIVE_INFINITY. Actual: ' + (parseFloat("Infinity1"))); |
| 17 |
} |
| 18 |
|
| 19 |
//CHECK#2 |
| 20 |
if (parseFloat("Infinityx") !== Number.POSITIVE_INFINITY) { |
| 21 |
$ERROR('#2: parseFloat("Infinityx") === Number.POSITIVE_INFINITY. Actual: ' + (parseFloat("Infinityx"))); |
| 22 |
} |
| 23 |
|
| 24 |
//CHECK#3 |
| 25 |
if (parseFloat("Infinity+1") !== Number.POSITIVE_INFINITY) { |
| 26 |
$ERROR('#3: parseFloat("Infinity+1") === Number.POSITIVE_INFINITY. Actual: ' + (parseFloat("Infinity+1"))); |
| 27 |
} |