summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/parseFloat/S15.1.2.3_A3_T1.js
blob: 98fc07e9b25cccc12b16cbe36b9263a3c71f91b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: |
    If neither Result(2) nor any prefix of Result(2) satisfies the syntax of a
    StrDecimalLiteral (see 9.3.1), return NaN
esid: sec-parsefloat-string
description: parseFloat("some string") return NaN
---*/

assert.sameValue(parseFloat("str"), NaN, "str");
assert.sameValue(parseFloat("s1"), NaN, "s1");
assert.sameValue(parseFloat(""), NaN, "");
assert.sameValue(parseFloat("+"), NaN, "+");

reportCompare(0, 0);