Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/parseFloat/tonumber-numeric-separator-literal-dd-nsl-dd-one-of.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 StrStrUnsignedDecimalLiteral :::
11 StrUnsignedDecimalLiteral
12
13
14 StrDecimalDigits :::
15 DecimalDigit
16 ...
17
18 DecimalDigit ::: one of
19 0 1 2 3 4 5 6 7 8 9
20
21 features: [numeric-separator-literal]
22 ---*/
23
24 assert.sameValue(parseFloat("1_0"), 1);
25 assert.sameValue(parseFloat("1_1"), 1);
26 assert.sameValue(parseFloat("1_2"), 1);
27 assert.sameValue(parseFloat("1_3"), 1);
28 assert.sameValue(parseFloat("1_4"), 1);
29 assert.sameValue(parseFloat("1_5"), 1);
30 assert.sameValue(parseFloat("1_6"), 1);
31 assert.sameValue(parseFloat("1_7"), 1);
32 assert.sameValue(parseFloat("1_8"), 1);
33 assert.sameValue(parseFloat("1_9"), 1);