| 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: prod-NumericLiteralSeparator |
| 6 |
description: NumericLiteralSeparator is not valid on string conversions for ToNumber operations |
| 7 |
info: | |
| 8 |
`0o` | `0O` OctalDigit NumericLiteralSeparator OctalDigit |
| 9 |
|
| 10 |
NumericLiteralSeparator :: |
| 11 |
_ |
| 12 |
|
| 13 |
OctalIntegerLiteral :: |
| 14 |
0o OctalDigits |
| 15 |
0O OctalDigits |
| 16 |
|
| 17 |
OctalDigits :: |
| 18 |
OctalDigit |
| 19 |
OctalDigits OctalDigit |
| 20 |
OctalDigits NumericLiteralSeparator OctalDigit |
| 21 |
|
| 22 |
OctalDigit :: one of |
| 23 |
0 1 2 3 4 5 6 7 |
| 24 |
|
| 25 |
features: [numeric-separator-literal] |
| 26 |
---*/ |
| 27 |
|
| 28 |
assert.sameValue(Number("0o0_0"), NaN, "0o0_0"); |
| 29 |
assert.sameValue(Number("0o1_1"), NaN, "0o1_1"); |
| 30 |
assert.sameValue(Number("0o2_2"), NaN, "0o2_2"); |
| 31 |
assert.sameValue(Number("0o3_3"), NaN, "0o3_3"); |
| 32 |
assert.sameValue(Number("0o4_4"), NaN, "0o4_4"); |
| 33 |
assert.sameValue(Number("0o5_5"), NaN, "0o5_5"); |
| 34 |
assert.sameValue(Number("0o6_6"), NaN, "0o6_6"); |
| 35 |
assert.sameValue(Number("0o7_7"), NaN, "0o7_7"); |