2011-09-07 08:35:18 +02:00
|
|
|
// Copyright 2009 the Sputnik authors. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
2014-07-22 01:09:02 +02:00
|
|
|
/*---
|
2018-01-05 18:26:51 +01:00
|
|
|
info: |
|
2014-07-22 01:09:02 +02:00
|
|
|
Compute the longest prefix of Result(2), which might be Result(2) itself,
|
|
|
|
which satisfies the syntax of a StrDecimalLiteral
|
2017-06-29 17:24:37 +02:00
|
|
|
esid: sec-parsefloat-string
|
2014-07-22 01:09:02 +02:00
|
|
|
description: "\"Infinity\"+\"some string\""
|
|
|
|
---*/
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
//CHECK#1
|
|
|
|
if (parseFloat("Infinity1") !== Number.POSITIVE_INFINITY) {
|
|
|
|
$ERROR('#1: parseFloat("Infinity1") === Number.POSITIVE_INFINITY. Actual: ' + (parseFloat("Infinity1")));
|
|
|
|
}
|
|
|
|
|
|
|
|
//CHECK#2
|
|
|
|
if (parseFloat("Infinityx") !== Number.POSITIVE_INFINITY) {
|
|
|
|
$ERROR('#2: parseFloat("Infinityx") === Number.POSITIVE_INFINITY. Actual: ' + (parseFloat("Infinityx")));
|
|
|
|
}
|
|
|
|
|
|
|
|
//CHECK#3
|
|
|
|
if (parseFloat("Infinity+1") !== Number.POSITIVE_INFINITY) {
|
|
|
|
$ERROR('#3: parseFloat("Infinity+1") === Number.POSITIVE_INFINITY. Actual: ' + (parseFloat("Infinity+1")));
|
|
|
|
}
|