Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/parseFloat/tonumber-numeric-separator-literal-sign-plus-dds-nsl-dd.js

raw
1 // Copyright (C) 2017 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 esid: sec-tonumber-applied-to-the-string-type
6 description: >
7 The NSL does not affect strings parsed by parseFloat (StrUnsignedDecimalLiteral)
8 info: |
9
10 StrDecimalLiteral :::
11 StrUnsignedDecimalLiteral
12 + StrUnsignedDecimalLiteral
13 - StrUnsignedDecimalLiteral
14 features: [numeric-separator-literal]
15 ---*/
16
17 assert.sameValue(parseFloat("+123456789_0"), +123456789);
18 assert.sameValue(parseFloat("+123456789_1"), +123456789);
19 assert.sameValue(parseFloat("+123456789_2"), +123456789);
20 assert.sameValue(parseFloat("+123456789_3"), +123456789);
21 assert.sameValue(parseFloat("+123456789_4"), +123456789);
22 assert.sameValue(parseFloat("+123456789_5"), +123456789);
23 assert.sameValue(parseFloat("+123456789_6"), +123456789);
24 assert.sameValue(parseFloat("+123456789_7"), +123456789);
25 assert.sameValue(parseFloat("+123456789_8"), +123456789);
26 assert.sameValue(parseFloat("+123456789_9"), +123456789);