mirror of https://github.com/tc39/test262.git
Revert "Tests for NumericSeparatorLiteral. Closes gh-1051" (#1188)
This commit is contained in:
parent
e88fea4682
commit
8422147c17
|
@ -1,27 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`0b` | `0B` BinaryDigit NumericLiteralSeparator BinaryDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
BinaryIntegerLiteral ::
|
||||
0b BinaryDigits
|
||||
0B BinaryDigits
|
||||
|
||||
BinaryDigits ::
|
||||
BinaryDigit
|
||||
BinaryDigits BinaryDigit
|
||||
BinaryDigits NumericLiteralSeparator BinaryDigit
|
||||
|
||||
BinaryDigit :: one of
|
||||
0 1
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number("0b0_1"), 0b01);
|
||||
assert.sameValue(Number("0B0_1"), 0B01);
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`0b` | `0B` BinaryDigit NumericLiteralSeparator BinaryDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
BinaryIntegerLiteral ::
|
||||
0b BinaryDigits
|
||||
0B BinaryDigits
|
||||
|
||||
BinaryDigits ::
|
||||
BinaryDigit
|
||||
BinaryDigits BinaryDigit
|
||||
BinaryDigits NumericLiteralSeparator BinaryDigit
|
||||
|
||||
BinaryDigit :: one of
|
||||
0 1
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number("0b0_10"), 0b010);
|
||||
assert.sameValue(Number("0B0_10"), 0B010);
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`0b` | `0B` BinaryDigits NumericLiteralSeparator BinaryDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
BinaryIntegerLiteral ::
|
||||
0b BinaryDigits
|
||||
0B BinaryDigits
|
||||
|
||||
BinaryDigits ::
|
||||
BinaryDigit
|
||||
BinaryDigits BinaryDigit
|
||||
BinaryDigits NumericLiteralSeparator BinaryDigit
|
||||
|
||||
BinaryDigit :: one of
|
||||
0 1
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number("0b01_0"), 0b010);
|
||||
assert.sameValue(Number("0B01_0"), 0B010);
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`0b` | `0B` BinaryDigits NumericLiteralSeparator BinaryDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
BinaryIntegerLiteral ::
|
||||
0b BinaryDigits
|
||||
0B BinaryDigits
|
||||
|
||||
BinaryDigits ::
|
||||
BinaryDigit
|
||||
BinaryDigits BinaryDigit
|
||||
BinaryDigits NumericLiteralSeparator BinaryDigit
|
||||
|
||||
BinaryDigit :: one of
|
||||
0 1
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number("0b01_00"), 0b0100);
|
||||
assert.sameValue(Number("0B01_00"), 0B0100);
|
|
@ -1,26 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
DecimalDigits `.` DecimalDigits ExponentPart_opt `-` DecimalDigits
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalLiteral ::
|
||||
DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt
|
||||
|
||||
DecimalDigits ::
|
||||
...
|
||||
DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
SignedInteger ::
|
||||
...
|
||||
- DecimalDigits
|
||||
...
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number("1.0e-1_0"), 1.0e-10);
|
|
@ -1,26 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
DecimalDigits `.` DecimalDigits ExponentPart_opt `-` DecimalDigits
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalLiteral ::
|
||||
DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt
|
||||
|
||||
DecimalDigits ::
|
||||
...
|
||||
DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
SignedInteger ::
|
||||
...
|
||||
- DecimalDigits
|
||||
...
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number("1.0e-10_0"), 1.0e-100);
|
|
@ -1,26 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
DecimalDigits `.` DecimalDigits ExponentPart_opt `+` DecimalDigits
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalLiteral ::
|
||||
DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt
|
||||
|
||||
DecimalDigits ::
|
||||
...
|
||||
DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
SignedInteger ::
|
||||
...
|
||||
+ DecimalDigits
|
||||
...
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number("1.0e+1_0"), 1.0e+10);
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
DecimalDigits `.` DecimalDigits ExponentPart_opt `+` DecimalDigits
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalLiteral ::
|
||||
DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt
|
||||
|
||||
DecimalDigits ::
|
||||
...
|
||||
DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
SignedInteger ::
|
||||
...
|
||||
+ DecimalDigits
|
||||
...
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number("1.0e+10_0"), 1.0e+100);
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: NonZeroDigit NumericLiteralSeparator DecimalDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalIntegerLiteral ::
|
||||
...
|
||||
NonZeroDigit NumericLiteralSeparator_opt DecimalDigits
|
||||
|
||||
|
||||
DecimalDigits ::
|
||||
DecimalDigit
|
||||
...
|
||||
|
||||
DecimalDigit :: one of
|
||||
0 1 2 3 4 5 6 7 8 9
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number("1_0"), 10);
|
||||
assert.sameValue(Number("1_1"), 11);
|
||||
assert.sameValue(Number("1_2"), 12);
|
||||
assert.sameValue(Number("1_3"), 13);
|
||||
assert.sameValue(Number("1_4"), 14);
|
||||
assert.sameValue(Number("1_5"), 15);
|
||||
assert.sameValue(Number("1_6"), 16);
|
||||
assert.sameValue(Number("1_7"), 17);
|
||||
assert.sameValue(Number("1_8"), 18);
|
||||
assert.sameValue(Number("1_9"), 19);
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
DecimalDigits `.` DecimalDigits NumericLiteralSeparator DecimalDigits
|
||||
ExponentPart SignedInteger
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalLiteral ::
|
||||
. DecimalDigits ExponentPart_opt
|
||||
|
||||
DecimalDigits ::
|
||||
...
|
||||
DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
ExponentIndicator :: one of
|
||||
e E
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number("10.00_01e2"), 10.0001e2);
|
|
@ -1,26 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalDigits ::
|
||||
...
|
||||
DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number("123456789_0"), 1234567890);
|
||||
assert.sameValue(Number("123456789_1"), 1234567891);
|
||||
assert.sameValue(Number("123456789_2"), 1234567892);
|
||||
assert.sameValue(Number("123456789_3"), 1234567893);
|
||||
assert.sameValue(Number("123456789_4"), 1234567894);
|
||||
assert.sameValue(Number("123456789_5"), 1234567895);
|
||||
assert.sameValue(Number("123456789_6"), 1234567896);
|
||||
assert.sameValue(Number("123456789_7"), 1234567897);
|
||||
assert.sameValue(Number("123456789_8"), 1234567898);
|
||||
assert.sameValue(Number("123456789_9"), 1234567899);
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`.` DecimalDigit NumericLiteralSeparator DecimalDigit ExponentPart
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalLiteral ::
|
||||
. DecimalDigits ExponentPart_opt
|
||||
|
||||
DecimalDigits ::
|
||||
DecimalDigit
|
||||
...
|
||||
DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
ExponentIndicator :: one of
|
||||
e E
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number(".0_1e2"), .01e2);
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`.` DecimalDigit NumericLiteralSeparator DecimalDigits ExponentPart
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalLiteral ::
|
||||
. DecimalDigits ExponentPart_opt
|
||||
|
||||
DecimalDigits ::
|
||||
DecimalDigit
|
||||
...
|
||||
DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
ExponentIndicator :: one of
|
||||
e E
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number(".1_01e2"), .101e2);
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`.` DecimalDigits NumericLiteralSeparator DecimalDigit ExponentPart
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalLiteral ::
|
||||
. DecimalDigits ExponentPart_opt
|
||||
|
||||
DecimalDigits ::
|
||||
DecimalDigit
|
||||
...
|
||||
DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
ExponentIndicator :: one of
|
||||
e E
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number(".10_1e2"), .101e2);
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`.` DecimalDigits NumericLiteralSeparator DecimalDigits ExponentPart
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalLiteral ::
|
||||
. DecimalDigits ExponentPart_opt
|
||||
|
||||
DecimalDigits ::
|
||||
DecimalDigit
|
||||
...
|
||||
DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
ExponentIndicator :: one of
|
||||
e E
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number(".00_01e2"), .0001e2);
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`0x` | `0X` HexDigit NumericLiteralSeparator HexDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
HexIntegerLiteral ::
|
||||
0x HexDigits
|
||||
0X HexDigits
|
||||
|
||||
HexDigits ::
|
||||
HexDigit
|
||||
HexDigits HexDigit
|
||||
HexDigits NumericLiteralSeparator HexDigit
|
||||
|
||||
HexDigit::one of
|
||||
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number("0x0_1"), 0x01);
|
||||
assert.sameValue(Number("0X0_1"), 0X01);
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`0x` | `0X` HexDigit NumericLiteralSeparator HexDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
HexIntegerLiteral ::
|
||||
0x HexDigits
|
||||
0X HexDigits
|
||||
|
||||
HexDigits ::
|
||||
HexDigit
|
||||
HexDigits HexDigit
|
||||
HexDigits NumericLiteralSeparator HexDigit
|
||||
|
||||
HexDigit::one of
|
||||
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number("0x0_10"), 0x010);
|
||||
assert.sameValue(Number("0X0_10"), 0X010);
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`0x` | `0X` HexDigits NumericLiteralSeparator HexDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
HexIntegerLiteral ::
|
||||
0x HexDigits
|
||||
0X HexDigits
|
||||
|
||||
HexDigits ::
|
||||
HexDigit
|
||||
HexDigits HexDigit
|
||||
HexDigits NumericLiteralSeparator HexDigit
|
||||
|
||||
HexDigit::one of
|
||||
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number("0x01_0"), 0x010);
|
||||
assert.sameValue(Number("0X01_0"), 0X010);
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`0x` | `0X` HexDigits NumericLiteralSeparator HexDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
HexIntegerLiteral ::
|
||||
0x HexDigits
|
||||
0X HexDigits
|
||||
|
||||
HexDigits ::
|
||||
HexDigit
|
||||
HexDigits HexDigit
|
||||
HexDigits NumericLiteralSeparator HexDigit
|
||||
|
||||
HexDigit::one of
|
||||
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number("0x01_00"), 0x0100);
|
||||
assert.sameValue(Number("0X01_00"), 0X0100);
|
|
@ -1,47 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`0x` | `0X` HexDigit NumericLiteralSeparator HexDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
HexIntegerLiteral ::
|
||||
0x HexDigits
|
||||
0X HexDigits
|
||||
|
||||
HexDigits ::
|
||||
HexDigit
|
||||
HexDigits HexDigit
|
||||
HexDigits NumericLiteralSeparator HexDigit
|
||||
|
||||
HexDigit::one of
|
||||
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number("0x0_0"), 0x00);
|
||||
assert.sameValue(Number("0x1_1"), 0x11);
|
||||
assert.sameValue(Number("0x2_2"), 0x22);
|
||||
assert.sameValue(Number("0x3_3"), 0x33);
|
||||
assert.sameValue(Number("0x4_4"), 0x44);
|
||||
assert.sameValue(Number("0x5_5"), 0x55);
|
||||
assert.sameValue(Number("0x6_6"), 0x66);
|
||||
assert.sameValue(Number("0x7_7"), 0x77);
|
||||
assert.sameValue(Number("0x8_8"), 0x88);
|
||||
assert.sameValue(Number("0x9_9"), 0x99);
|
||||
assert.sameValue(Number("0xa_a"), 0xaa);
|
||||
assert.sameValue(Number("0xb_b"), 0xbb);
|
||||
assert.sameValue(Number("0xc_c"), 0xcc);
|
||||
assert.sameValue(Number("0xd_d"), 0xdd);
|
||||
assert.sameValue(Number("0xe_e"), 0xee);
|
||||
assert.sameValue(Number("0xf_f"), 0xff);
|
||||
assert.sameValue(Number("0xA_A"), 0xAA);
|
||||
assert.sameValue(Number("0xB_B"), 0xBB);
|
||||
assert.sameValue(Number("0xC_C"), 0xCC);
|
||||
assert.sameValue(Number("0xD_D"), 0xDD);
|
||||
assert.sameValue(Number("0xE_E"), 0xEE);
|
||||
assert.sameValue(Number("0xF_F"), 0xFF);
|
|
@ -1,38 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: NonZeroDigit NumericLiteralSeparator DecimalDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalIntegerLiteral ::
|
||||
...
|
||||
NonZeroDigit NumericLiteralSeparator_opt DecimalDigits
|
||||
|
||||
NonZeroDigit :: one of
|
||||
1 2 3 4 5 6 7 8 9
|
||||
|
||||
DecimalDigits ::
|
||||
DecimalDigit
|
||||
...
|
||||
|
||||
DecimalDigit :: one of
|
||||
0 1 2 3 4 5 6 7 8 9
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number("1_0"), 10);
|
||||
assert.sameValue(Number("1_1"), 11);
|
||||
assert.sameValue(Number("2_2"), 22);
|
||||
assert.sameValue(Number("3_3"), 33);
|
||||
assert.sameValue(Number("4_4"), 44);
|
||||
assert.sameValue(Number("5_5"), 55);
|
||||
assert.sameValue(Number("6_6"), 66);
|
||||
assert.sameValue(Number("7_7"), 77);
|
||||
assert.sameValue(Number("8_8"), 88);
|
||||
assert.sameValue(Number("9_9"), 99);
|
||||
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: NonZeroDigit NumericLiteralSeparator DecimalDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalIntegerLiteral ::
|
||||
...
|
||||
NonZeroDigit NumericLiteralSeparator_opt DecimalDigits
|
||||
|
||||
NonZeroDigit :: one of
|
||||
1 2 3 4 5 6 7 8 9
|
||||
|
||||
DecimalDigits ::
|
||||
...
|
||||
DecimalDigits DecimalDigit
|
||||
...
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number("1_1"), 11);
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: NonZeroDigit NumericLiteralSeparator DecimalDigits
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalIntegerLiteral ::
|
||||
...
|
||||
NonZeroDigit NumericLiteralSeparator_opt DecimalDigits
|
||||
|
||||
NonZeroDigit :: one of
|
||||
1 2 3 4 5 6 7 8 9
|
||||
|
||||
DecimalDigits ::
|
||||
...
|
||||
DecimalDigits DecimalDigit
|
||||
...
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number("1_0123456789"), 10123456789);
|
|
@ -1,33 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`0o` | `0O` OctalDigit NumericLiteralSeparator OctalDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
OctalIntegerLiteral ::
|
||||
0o OctalDigits
|
||||
0O OctalDigits
|
||||
|
||||
OctalDigits ::
|
||||
OctalDigit
|
||||
OctalDigits OctalDigit
|
||||
OctalDigits NumericLiteralSeparator OctalDigit
|
||||
|
||||
OctalDigit :: one of
|
||||
0 1 2 3 4 5 6 7
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number("0o0_0"), 0o00);
|
||||
assert.sameValue(Number("0o1_1"), 0o11);
|
||||
assert.sameValue(Number("0o2_2"), 0o22);
|
||||
assert.sameValue(Number("0o3_3"), 0o33);
|
||||
assert.sameValue(Number("0o4_4"), 0o44);
|
||||
assert.sameValue(Number("0o5_5"), 0o55);
|
||||
assert.sameValue(Number("0o6_6"), 0o66);
|
||||
assert.sameValue(Number("0o7_7"), 0o77);
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`0o` | `0O` OctalDigit NumericLiteralSeparator OctalDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
OctalIntegerLiteral ::
|
||||
0o OctalDigits
|
||||
0O OctalDigits
|
||||
|
||||
OctalDigits ::
|
||||
OctalDigit
|
||||
OctalDigits OctalDigit
|
||||
OctalDigits NumericLiteralSeparator OctalDigit
|
||||
|
||||
OctalDigit :: one of
|
||||
0 1 2 3 4 5 6 7
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number("0o0_1"), 0o01);
|
||||
assert.sameValue(Number("0O0_1"), 0O01);
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`0o` | `0O` OctalDigit NumericLiteralSeparator OctalDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
OctalIntegerLiteral ::
|
||||
0o OctalDigits
|
||||
0O OctalDigits
|
||||
|
||||
OctalDigits ::
|
||||
OctalDigit
|
||||
OctalDigits OctalDigit
|
||||
OctalDigits NumericLiteralSeparator OctalDigit
|
||||
|
||||
OctalDigit :: one of
|
||||
0 1 2 3 4 5 6 7
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number("0o0_10"), 0o010);
|
||||
assert.sameValue(Number("0O0_10"), 0O010);
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`0o` | `0O` OctalDigits NumericLiteralSeparator OctalDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
OctalIntegerLiteral ::
|
||||
0o OctalDigits
|
||||
0O OctalDigits
|
||||
|
||||
OctalDigits ::
|
||||
OctalDigit
|
||||
OctalDigits OctalDigit
|
||||
OctalDigits NumericLiteralSeparator OctalDigit
|
||||
|
||||
OctalDigit :: one of
|
||||
0 1 2 3 4 5 6 7
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number("0o01_0"), 0o010);
|
||||
assert.sameValue(Number("0O01_0"), 0O010);
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`0o` | `0O` OctalDigits NumericLiteralSeparator OctalDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
OctalIntegerLiteral ::
|
||||
0o OctalDigits
|
||||
0O OctalDigits
|
||||
|
||||
OctalDigits ::
|
||||
OctalDigit
|
||||
OctalDigits OctalDigit
|
||||
OctalDigits NumericLiteralSeparator OctalDigit
|
||||
|
||||
OctalDigit :: one of
|
||||
0 1 2 3 4 5 6 7
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number("0o01_00"), 0o0100);
|
||||
assert.sameValue(Number("0O01_00"), 0O0100);
|
|
@ -1,26 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
SignedInteger ::
|
||||
...
|
||||
- DecimalDigits
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number("-123456789_0"), -1234567890);
|
||||
assert.sameValue(Number("-123456789_1"), -1234567891);
|
||||
assert.sameValue(Number("-123456789_2"), -1234567892);
|
||||
assert.sameValue(Number("-123456789_3"), -1234567893);
|
||||
assert.sameValue(Number("-123456789_4"), -1234567894);
|
||||
assert.sameValue(Number("-123456789_5"), -1234567895);
|
||||
assert.sameValue(Number("-123456789_6"), -1234567896);
|
||||
assert.sameValue(Number("-123456789_7"), -1234567897);
|
||||
assert.sameValue(Number("-123456789_8"), -1234567898);
|
||||
assert.sameValue(Number("-123456789_9"), -1234567899);
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
SignedInteger ::
|
||||
...
|
||||
+ DecimalDigits
|
||||
...
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number("+123456789_0"), 1234567890);
|
||||
assert.sameValue(Number("+123456789_1"), 1234567891);
|
||||
assert.sameValue(Number("+123456789_2"), 1234567892);
|
||||
assert.sameValue(Number("+123456789_3"), 1234567893);
|
||||
assert.sameValue(Number("+123456789_4"), 1234567894);
|
||||
assert.sameValue(Number("+123456789_5"), 1234567895);
|
||||
assert.sameValue(Number("+123456789_6"), 1234567896);
|
||||
assert.sameValue(Number("+123456789_7"), 1234567897);
|
||||
assert.sameValue(Number("+123456789_8"), 1234567898);
|
||||
assert.sameValue(Number("+123456789_9"), 1234567899);
|
|
@ -1,23 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: 0b StrBinaryDigits, 0B StrBinaryDigits
|
||||
info: |
|
||||
|
||||
StrBinaryIntegerLiteral :::
|
||||
0b StrBinaryDigits
|
||||
0B StrBinaryDigits
|
||||
|
||||
StrBinaryDigits :::
|
||||
BinaryDigit
|
||||
StrBinaryDigits BinaryDigit
|
||||
|
||||
BinaryDigit ::: one of
|
||||
0 1
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat("0b0_1"), 0b0);
|
||||
assert.sameValue(parseFloat("0B0_1"), 0B0);
|
|
@ -1,23 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: 0b StrBinaryDigits, 0B StrBinaryDigits
|
||||
info: |
|
||||
|
||||
StrBinaryIntegerLiteral :::
|
||||
0b StrBinaryDigits
|
||||
0B StrBinaryDigits
|
||||
|
||||
StrBinaryDigits :::
|
||||
BinaryDigit
|
||||
StrBinaryDigits BinaryDigit
|
||||
|
||||
BinaryDigit ::: one of
|
||||
0 1
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat("0b0_10"), 0b0);
|
||||
assert.sameValue(parseFloat("0B0_10"), 0B0);
|
|
@ -1,23 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: 0b StrBinaryDigits, 0B StrBinaryDigits
|
||||
info: |
|
||||
|
||||
StrBinaryIntegerLiteral :::
|
||||
0b StrBinaryDigits
|
||||
0B StrBinaryDigits
|
||||
|
||||
StrBinaryDigits :::
|
||||
BinaryDigit
|
||||
StrBinaryDigits BinaryDigit
|
||||
|
||||
BinaryDigit ::: one of
|
||||
0 1
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat("0b01_0"), 0b01);
|
||||
assert.sameValue(parseFloat("0B01_0"), 0B01);
|
|
@ -1,23 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: 0b StrBinaryDigits, 0B StrBinaryDigits
|
||||
info: |
|
||||
|
||||
StrBinaryIntegerLiteral :::
|
||||
0b StrBinaryDigits
|
||||
0B StrBinaryDigits
|
||||
|
||||
StrBinaryDigits :::
|
||||
BinaryDigit
|
||||
StrBinaryDigits BinaryDigit
|
||||
|
||||
BinaryDigit ::: one of
|
||||
0 1
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat("0b01_00"), 0b01);
|
||||
assert.sameValue(parseFloat("0B01_00"), 0B01);
|
|
@ -1,19 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: StrDecimalDigits . StrDecimalDigits StrExponentPart
|
||||
info: |
|
||||
|
||||
StrUnsignedDecimalLiteral :::
|
||||
StrDecimalDigits . StrDecimalDigits StrExponentPart
|
||||
|
||||
StrDecimalDigits :::
|
||||
DecimalDigit
|
||||
StrDecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat("1.0e-1_0"), 1.0e-1);
|
|
@ -1,19 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: StrDecimalDigits . StrDecimalDigits StrExponentPart
|
||||
info: |
|
||||
|
||||
StrUnsignedDecimalLiteral :::
|
||||
StrDecimalDigits . StrDecimalDigits StrExponentPart
|
||||
|
||||
StrDecimalDigits :::
|
||||
DecimalDigit
|
||||
StrDecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat("1.0e-10_0"), 1.0e-10);
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: >
|
||||
StrDecimalDigits . StrDecimalDigits StrExponentPart
|
||||
info: |
|
||||
|
||||
StrUnsignedDecimalLiteral :::
|
||||
StrDecimalDigits . StrDecimalDigits StrExponentPart
|
||||
|
||||
StrDecimalDigits :::
|
||||
DecimalDigit
|
||||
StrDecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat("1.0e+1_0"), 1.0e+1);
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: StrDecimalDigits . StrDecimalDigits StrExponentPart
|
||||
info: |
|
||||
|
||||
StrUnsignedDecimalLiteral :::
|
||||
StrDecimalDigits . StrDecimalDigits StrExponentPart
|
||||
|
||||
StrDecimalDigits :::
|
||||
DecimalDigit
|
||||
StrDecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat("1.0e+10_0"), 1.0e+10);
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: StrUnsignedDecimalLiteral
|
||||
info: |
|
||||
|
||||
StrStrUnsignedDecimalLiteral :::
|
||||
StrUnsignedDecimalLiteral
|
||||
|
||||
|
||||
StrDecimalDigits :::
|
||||
DecimalDigit
|
||||
...
|
||||
|
||||
DecimalDigit ::: one of
|
||||
0 1 2 3 4 5 6 7 8 9
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat("1_0"), 1);
|
||||
assert.sameValue(parseFloat("1_1"), 1);
|
||||
assert.sameValue(parseFloat("1_2"), 1);
|
||||
assert.sameValue(parseFloat("1_3"), 1);
|
||||
assert.sameValue(parseFloat("1_4"), 1);
|
||||
assert.sameValue(parseFloat("1_5"), 1);
|
||||
assert.sameValue(parseFloat("1_6"), 1);
|
||||
assert.sameValue(parseFloat("1_7"), 1);
|
||||
assert.sameValue(parseFloat("1_8"), 1);
|
||||
assert.sameValue(parseFloat("1_9"), 1);
|
|
@ -1,18 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: StrDecimalDigits . StrDecimalDigits StrExponentPart
|
||||
info: |
|
||||
|
||||
StrUnsignedDecimalLiteral :::
|
||||
. StrDecimalDigits StrExponentPart
|
||||
|
||||
StrDecimalDigits :::
|
||||
DecimalDigit
|
||||
StrDecimalDigits DecimalDigit
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat("10.00_01e2"), 10.00);
|
|
@ -1,24 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: StrDecimalDigits
|
||||
info: |
|
||||
|
||||
StrDecimalDigits :::
|
||||
DecimalDigit
|
||||
StrDecimalDigits DecimalDigit
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat("123456789_0"), 123456789);
|
||||
assert.sameValue(parseFloat("123456789_1"), 123456789);
|
||||
assert.sameValue(parseFloat("123456789_2"), 123456789);
|
||||
assert.sameValue(parseFloat("123456789_3"), 123456789);
|
||||
assert.sameValue(parseFloat("123456789_4"), 123456789);
|
||||
assert.sameValue(parseFloat("123456789_5"), 123456789);
|
||||
assert.sameValue(parseFloat("123456789_6"), 123456789);
|
||||
assert.sameValue(parseFloat("123456789_7"), 123456789);
|
||||
assert.sameValue(parseFloat("123456789_8"), 123456789);
|
||||
assert.sameValue(parseFloat("123456789_9"), 123456789);
|
|
@ -1,19 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: . StrDecimalDigits StrExponentPart
|
||||
info: |
|
||||
|
||||
StrUnsignedDecimalLiteral :::
|
||||
. StrDecimalDigits StrExponentPart
|
||||
|
||||
StrDecimalDigits :::
|
||||
DecimalDigit
|
||||
...
|
||||
StrDecimalDigits DecimalDigit
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat(".0_1e2"), .0);
|
|
@ -1,19 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: . StrDecimalDigits StrExponentPart
|
||||
info: |
|
||||
|
||||
StrUnsignedDecimalLiteral :::
|
||||
. StrDecimalDigits StrExponentPart
|
||||
|
||||
StrDecimalDigits :::
|
||||
DecimalDigit
|
||||
...
|
||||
StrDecimalDigits DecimalDigit
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat(".1_01e2"), .1);
|
|
@ -1,18 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: . StrDecimalDigits StrExponentPart
|
||||
info: |
|
||||
|
||||
StrUnsignedDecimalLiteral :::
|
||||
. StrDecimalDigits StrExponentPart
|
||||
|
||||
StrDecimalDigits :::
|
||||
DecimalDigit
|
||||
StrDecimalDigits DecimalDigit
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat(".10_1e2"), .10);
|
|
@ -1,18 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: . StrDecimalDigits StrExponentPart
|
||||
info: |
|
||||
|
||||
StrUnsignedDecimalLiteral :::
|
||||
. StrDecimalDigits StrExponentPart
|
||||
|
||||
StrDecimalDigits :::
|
||||
DecimalDigit
|
||||
StrDecimalDigits DecimalDigit
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat(".00_01e2"), .00);
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: 0x StrHexDigits, 0X StrHexDigits
|
||||
info: |
|
||||
|
||||
StrHexLiteral :::
|
||||
0x StrHexDigits
|
||||
0X StrHexDigits
|
||||
|
||||
StrHexDigits :::
|
||||
HexDigit
|
||||
StrHexDigits HexDigit
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat("0x0_1"), 0x0);
|
||||
assert.sameValue(parseFloat("0X0_1"), 0X0);
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: 0x StrHexDigits, 0X StrHexDigits
|
||||
info: |
|
||||
|
||||
StrHexLiteral :::
|
||||
0x StrHexDigits
|
||||
0X StrHexDigits
|
||||
|
||||
StrHexDigits :::
|
||||
HexDigit
|
||||
StrHexDigits HexDigit
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat("0x0_10"), 0x0);
|
||||
assert.sameValue(parseFloat("0X0_10"), 0X0);
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: 0x StrHexDigits, 0X StrHexDigits
|
||||
info: |
|
||||
|
||||
StrHexLiteral :::
|
||||
0x StrHexDigits
|
||||
0X StrHexDigits
|
||||
|
||||
StrHexDigits :::
|
||||
HexDigit
|
||||
StrHexDigits HexDigit
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat("0x01_0"), 0x01);
|
||||
assert.sameValue(parseFloat("0X01_0"), 0X01);
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: 0x StrHexDigits, 0X StrHexDigits
|
||||
info: |
|
||||
|
||||
StrHexLiteral :::
|
||||
0x StrHexDigits
|
||||
0X StrHexDigits
|
||||
|
||||
StrHexDigits :::
|
||||
HexDigit
|
||||
StrHexDigits HexDigit
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat("0x01_00"), 0x01);
|
||||
assert.sameValue(parseFloat("0X01_00"), 0X01);
|
|
@ -1,40 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: 0x StrHexDigits, 0X StrHexDigits
|
||||
info: |
|
||||
|
||||
StrHexLiteral :::
|
||||
0x StrHexDigits
|
||||
0X StrHexDigits
|
||||
|
||||
StrHexDigits :::
|
||||
HexDigit
|
||||
StrHexDigits HexDigit
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat("0x0_0"), 0x0);
|
||||
assert.sameValue(parseFloat("0x1_1"), 0x1);
|
||||
assert.sameValue(parseFloat("0x2_2"), 0x2);
|
||||
assert.sameValue(parseFloat("0x3_3"), 0x3);
|
||||
assert.sameValue(parseFloat("0x4_4"), 0x4);
|
||||
assert.sameValue(parseFloat("0x5_5"), 0x5);
|
||||
assert.sameValue(parseFloat("0x6_6"), 0x6);
|
||||
assert.sameValue(parseFloat("0x7_7"), 0x7);
|
||||
assert.sameValue(parseFloat("0x8_8"), 0x8);
|
||||
assert.sameValue(parseFloat("0x9_9"), 0x9);
|
||||
assert.sameValue(parseFloat("0xa_a"), 0xa);
|
||||
assert.sameValue(parseFloat("0xb_b"), 0xb);
|
||||
assert.sameValue(parseFloat("0xc_c"), 0xc);
|
||||
assert.sameValue(parseFloat("0xd_d"), 0xd);
|
||||
assert.sameValue(parseFloat("0xe_e"), 0xe);
|
||||
assert.sameValue(parseFloat("0xf_f"), 0xf);
|
||||
assert.sameValue(parseFloat("0xA_A"), 0xA);
|
||||
assert.sameValue(parseFloat("0xB_B"), 0xB);
|
||||
assert.sameValue(parseFloat("0xC_C"), 0xC);
|
||||
assert.sameValue(parseFloat("0xD_D"), 0xD);
|
||||
assert.sameValue(parseFloat("0xE_E"), 0xE);
|
||||
assert.sameValue(parseFloat("0xF_F"), 0xF);
|
|
@ -1,33 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: NonZeroDigit NumericLiteralSeparator DecimalDigit
|
||||
info: |
|
||||
|
||||
StrStrUnsignedDecimalLiteral :::
|
||||
StrUnsignedDecimalLiteral
|
||||
|
||||
NonZeroDigit ::: one of
|
||||
1 2 3 4 5 6 7 8 9
|
||||
|
||||
StrDecimalDigits :::
|
||||
DecimalDigit
|
||||
...
|
||||
|
||||
DecimalDigit ::: one of
|
||||
0 1 2 3 4 5 6 7 8 9
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat("1_0"), 1);
|
||||
assert.sameValue(parseFloat("1_1"), 1);
|
||||
assert.sameValue(parseFloat("2_2"), 2);
|
||||
assert.sameValue(parseFloat("3_3"), 3);
|
||||
assert.sameValue(parseFloat("4_4"), 4);
|
||||
assert.sameValue(parseFloat("5_5"), 5);
|
||||
assert.sameValue(parseFloat("6_6"), 6);
|
||||
assert.sameValue(parseFloat("7_7"), 7);
|
||||
assert.sameValue(parseFloat("8_8"), 8);
|
||||
assert.sameValue(parseFloat("9_9"), 9);
|
|
@ -1,16 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: StrDecimalDigits
|
||||
info: |
|
||||
|
||||
StrDecimalDigits :::
|
||||
DecimalDigit
|
||||
StrDecimalDigits DecimalDigit
|
||||
...
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat("1_1"), 1);
|
|
@ -1,15 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: DecimalDigit
|
||||
info: |
|
||||
|
||||
StrDecimalDigits :::
|
||||
DecimalDigit
|
||||
StrDecimalDigits DecimalDigit
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat("1_0123456789"), 1);
|
|
@ -1,26 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: 0o StrOctalDigits, 0O StrOctalDigits
|
||||
info: |
|
||||
|
||||
StrOctalLiteral :::
|
||||
0o StrOctalDigits
|
||||
0O StrOctalDigits
|
||||
|
||||
StrOctalDigits :::
|
||||
OctalDigit
|
||||
StrOctalDigits OctalDigit
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat("0o0_0"), 0o0);
|
||||
assert.sameValue(parseFloat("0o1_1"), 0o1);
|
||||
assert.sameValue(parseFloat("0o2_2"), 0o2);
|
||||
assert.sameValue(parseFloat("0o3_3"), 0o3);
|
||||
assert.sameValue(parseFloat("0o4_4"), 0o4);
|
||||
assert.sameValue(parseFloat("0o5_5"), 0o5);
|
||||
assert.sameValue(parseFloat("0o6_6"), 0o6);
|
||||
assert.sameValue(parseFloat("0o7_7"), 0o7);
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: 0o StrOctalDigits, 0O StrOctalDigits
|
||||
info: |
|
||||
|
||||
StrOctalLiteral :::
|
||||
0o StrOctalDigits
|
||||
0O StrOctalDigits
|
||||
|
||||
StrOctalDigits :::
|
||||
OctalDigit
|
||||
StrOctalDigits OctalDigit
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat("0o0_1"), 0o0);
|
||||
assert.sameValue(parseFloat("0O0_1"), 0O0);
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: 0o StrOctalDigits, 0O StrOctalDigits
|
||||
info: |
|
||||
|
||||
StrOctalLiteral :::
|
||||
0o StrOctalDigits
|
||||
0O StrOctalDigits
|
||||
|
||||
StrOctalDigits :::
|
||||
OctalDigit
|
||||
StrOctalDigits OctalDigit
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat("0o0_10"), 0o0);
|
||||
assert.sameValue(parseFloat("0O0_10"), 0O0);
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: 0o StrOctalDigits, 0O StrOctalDigits
|
||||
info: |
|
||||
|
||||
StrOctalLiteral :::
|
||||
0o StrOctalDigits
|
||||
0O StrOctalDigits
|
||||
|
||||
StrOctalDigits :::
|
||||
OctalDigit
|
||||
StrOctalDigits OctalDigit
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat("0o01_0"), 0o01);
|
||||
assert.sameValue(parseFloat("0O01_0"), 0O01);
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: 0o StrOctalDigits, 0O StrOctalDigits
|
||||
info: |
|
||||
|
||||
StrOctalLiteral :::
|
||||
0o StrOctalDigits
|
||||
0O StrOctalDigits
|
||||
|
||||
StrOctalDigits :::
|
||||
OctalDigit
|
||||
StrOctalDigits OctalDigit
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat("0o01_00"), 0o01);
|
||||
assert.sameValue(parseFloat("0O01_00"), 0O01);
|
|
@ -1,26 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: >
|
||||
StrUnsignedDecimalLiteral, + StrUnsignedDecimalLiteral, - StrUnsignedDecimalLiteral
|
||||
info: |
|
||||
|
||||
StrDecimalLiteral :::
|
||||
StrUnsignedDecimalLiteral
|
||||
+ StrUnsignedDecimalLiteral
|
||||
- StrUnsignedDecimalLiteral
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat("-123456789_0"), -123456789);
|
||||
assert.sameValue(parseFloat("-123456789_1"), -123456789);
|
||||
assert.sameValue(parseFloat("-123456789_2"), -123456789);
|
||||
assert.sameValue(parseFloat("-123456789_3"), -123456789);
|
||||
assert.sameValue(parseFloat("-123456789_4"), -123456789);
|
||||
assert.sameValue(parseFloat("-123456789_5"), -123456789);
|
||||
assert.sameValue(parseFloat("-123456789_6"), -123456789);
|
||||
assert.sameValue(parseFloat("-123456789_7"), -123456789);
|
||||
assert.sameValue(parseFloat("-123456789_8"), -123456789);
|
||||
assert.sameValue(parseFloat("-123456789_9"), -123456789);
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-tonumber-applied-to-the-string-type
|
||||
description: StrUnsignedDecimalLiteral
|
||||
info: |
|
||||
|
||||
StrDecimalLiteral :::
|
||||
StrUnsignedDecimalLiteral
|
||||
+ StrUnsignedDecimalLiteral
|
||||
- StrUnsignedDecimalLiteral
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(parseFloat("+123456789_0"), +123456789);
|
||||
assert.sameValue(parseFloat("+123456789_1"), +123456789);
|
||||
assert.sameValue(parseFloat("+123456789_2"), +123456789);
|
||||
assert.sameValue(parseFloat("+123456789_3"), +123456789);
|
||||
assert.sameValue(parseFloat("+123456789_4"), +123456789);
|
||||
assert.sameValue(parseFloat("+123456789_5"), +123456789);
|
||||
assert.sameValue(parseFloat("+123456789_6"), +123456789);
|
||||
assert.sameValue(parseFloat("+123456789_7"), +123456789);
|
||||
assert.sameValue(parseFloat("+123456789_8"), +123456789);
|
||||
assert.sameValue(parseFloat("+123456789_9"), +123456789);
|
|
@ -1,32 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
NumericLiteralSeparator may not be the appear adjacent to `0b` | `0B` in a
|
||||
BinaryIntegerLiteral
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
BinaryIntegerLiteral ::
|
||||
0b BinaryDigits
|
||||
0B BinaryDigits
|
||||
|
||||
BinaryDigits ::
|
||||
BinaryDigit
|
||||
BinaryDigits BinaryDigit
|
||||
BinaryDigits NumericLiteralSeparator BinaryDigit
|
||||
|
||||
BinaryDigit :: one of
|
||||
0 1
|
||||
|
||||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
0b_1
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`0b` | `0B` BinaryDigit NumericLiteralSeparator BinaryDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
BinaryIntegerLiteral ::
|
||||
0b BinaryDigits
|
||||
0B BinaryDigits
|
||||
|
||||
BinaryDigits ::
|
||||
BinaryDigit
|
||||
BinaryDigits BinaryDigit
|
||||
BinaryDigits NumericLiteralSeparator BinaryDigit
|
||||
|
||||
BinaryDigit :: one of
|
||||
0 1
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(0b0_1, 0b01);
|
||||
assert.sameValue(0B0_1, 0B01);
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`0b` | `0B` BinaryDigit NumericLiteralSeparator BinaryDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
BinaryIntegerLiteral ::
|
||||
0b BinaryDigits
|
||||
0B BinaryDigits
|
||||
|
||||
BinaryDigits ::
|
||||
BinaryDigit
|
||||
BinaryDigits BinaryDigit
|
||||
BinaryDigits NumericLiteralSeparator BinaryDigit
|
||||
|
||||
BinaryDigit :: one of
|
||||
0 1
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(0b0_10, 0b010);
|
||||
assert.sameValue(0B0_10, 0B010);
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`0b` | `0B` BinaryDigits NumericLiteralSeparator BinaryDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
BinaryIntegerLiteral ::
|
||||
0b BinaryDigits
|
||||
0B BinaryDigits
|
||||
|
||||
BinaryDigits ::
|
||||
BinaryDigit
|
||||
BinaryDigits BinaryDigit
|
||||
BinaryDigits NumericLiteralSeparator BinaryDigit
|
||||
|
||||
BinaryDigit :: one of
|
||||
0 1
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(0b01_0, 0b010);
|
||||
assert.sameValue(0B01_0, 0B010);
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`0b` | `0B` BinaryDigits NumericLiteralSeparator BinaryDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
BinaryIntegerLiteral ::
|
||||
0b BinaryDigits
|
||||
0B BinaryDigits
|
||||
|
||||
BinaryDigits ::
|
||||
BinaryDigit
|
||||
BinaryDigits BinaryDigit
|
||||
BinaryDigits NumericLiteralSeparator BinaryDigit
|
||||
|
||||
BinaryDigit :: one of
|
||||
0 1
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(0b01_00, 0b0100);
|
||||
assert.sameValue(0B01_00, 0B0100);
|
|
@ -1,32 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
NumericLiteralSeparator may not appear adjacent to another
|
||||
NumericLiteralSeparator in a BinaryIntegerLiteral
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
BinaryIntegerLiteral ::
|
||||
0b BinaryDigits
|
||||
0B BinaryDigits
|
||||
|
||||
BinaryDigits ::
|
||||
BinaryDigit
|
||||
BinaryDigits BinaryDigit
|
||||
BinaryDigits NumericLiteralSeparator BinaryDigit
|
||||
|
||||
BinaryDigit :: one of
|
||||
0 1
|
||||
|
||||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
0b0__0
|
|
@ -1,32 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
NumericLiteralSeparator may not be the last digit character of a
|
||||
BinaryIntegerLiteral
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
BinaryIntegerLiteral ::
|
||||
0b BinaryDigits
|
||||
0B BinaryDigits
|
||||
|
||||
BinaryDigits ::
|
||||
BinaryDigit
|
||||
BinaryDigits BinaryDigit
|
||||
BinaryDigits NumericLiteralSeparator BinaryDigit
|
||||
|
||||
BinaryDigit :: one of
|
||||
0 1
|
||||
|
||||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
0b0_
|
|
@ -1,26 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
DecimalDigits `.` DecimalDigits ExponentPart_opt `-` DecimalDigits
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalLiteral ::
|
||||
DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt
|
||||
|
||||
DecimalDigits ::
|
||||
...
|
||||
DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
SignedInteger ::
|
||||
...
|
||||
- DecimalDigits
|
||||
...
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(1.0e-1_0, 1.0e-10);
|
|
@ -1,26 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
DecimalDigits `.` DecimalDigits ExponentPart_opt `-` DecimalDigits
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalLiteral ::
|
||||
DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt
|
||||
|
||||
DecimalDigits ::
|
||||
...
|
||||
DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
SignedInteger ::
|
||||
...
|
||||
- DecimalDigits
|
||||
...
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(1.0e-10_0, 1.0e-100);
|
|
@ -1,26 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
DecimalDigits `.` DecimalDigits ExponentPart_opt `+` DecimalDigits
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalLiteral ::
|
||||
DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt
|
||||
|
||||
DecimalDigits ::
|
||||
...
|
||||
DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
SignedInteger ::
|
||||
...
|
||||
+ DecimalDigits
|
||||
...
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(1.0e+1_0, 1.0e+10);
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
DecimalDigits `.` DecimalDigits ExponentPart_opt `+` DecimalDigits
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalLiteral ::
|
||||
DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt
|
||||
|
||||
DecimalDigits ::
|
||||
...
|
||||
DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
SignedInteger ::
|
||||
...
|
||||
+ DecimalDigits
|
||||
...
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(1.0e+10_0, 1.0e+100);
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: NonZeroDigit NumericLiteralSeparator DecimalDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalIntegerLiteral ::
|
||||
...
|
||||
NonZeroDigit NumericLiteralSeparator_opt DecimalDigits
|
||||
|
||||
|
||||
DecimalDigits ::
|
||||
DecimalDigit
|
||||
...
|
||||
|
||||
DecimalDigit :: one of
|
||||
0 1 2 3 4 5 6 7 8 9
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(1_0, 10);
|
||||
assert.sameValue(1_1, 11);
|
||||
assert.sameValue(1_2, 12);
|
||||
assert.sameValue(1_3, 13);
|
||||
assert.sameValue(1_4, 14);
|
||||
assert.sameValue(1_5, 15);
|
||||
assert.sameValue(1_6, 16);
|
||||
assert.sameValue(1_7, 17);
|
||||
assert.sameValue(1_8, 18);
|
||||
assert.sameValue(1_9, 19);
|
|
@ -1,24 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
NumericLiteralSeparator may not appear adjacent to another
|
||||
NumericLiteralSeparator in a DecimalIntegerLiteral
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalIntegerLiteral ::
|
||||
...
|
||||
NonZeroDigit NumericLiteralSeparator_opt DecimalDigits
|
||||
|
||||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
1__0123456789
|
|
@ -1,26 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
NumericLiteralSeparator may not be the last digit character
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalLiteral ::
|
||||
DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt
|
||||
|
||||
DecimalDigits ::
|
||||
...
|
||||
DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
1_
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
DecimalDigits `.` DecimalDigits NumericLiteralSeparator DecimalDigits
|
||||
ExponentPart SignedInteger
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalLiteral ::
|
||||
. DecimalDigits ExponentPart_opt
|
||||
|
||||
DecimalDigits ::
|
||||
...
|
||||
DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
ExponentIndicator :: one of
|
||||
e E
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(10.00_01e2, 10.0001e2);
|
|
@ -1,26 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalDigits ::
|
||||
...
|
||||
DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(123456789_0, 1234567890);
|
||||
assert.sameValue(123456789_1, 1234567891);
|
||||
assert.sameValue(123456789_2, 1234567892);
|
||||
assert.sameValue(123456789_3, 1234567893);
|
||||
assert.sameValue(123456789_4, 1234567894);
|
||||
assert.sameValue(123456789_5, 1234567895);
|
||||
assert.sameValue(123456789_6, 1234567896);
|
||||
assert.sameValue(123456789_7, 1234567897);
|
||||
assert.sameValue(123456789_8, 1234567898);
|
||||
assert.sameValue(123456789_9, 1234567899);
|
|
@ -1,24 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
NumericLiteralSeparator may not appear adjacent to another
|
||||
NumericLiteralSeparator in DecimalIntegerLiteral
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalIntegerLiteral ::
|
||||
...
|
||||
NonZeroDigit NumericLiteralSeparator_opt DecimalDigits
|
||||
|
||||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
10__0123456789
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
NumericLiteralSeparator may not be the last digit character of a
|
||||
DecimalLiteral
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalLiteral ::
|
||||
DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt
|
||||
|
||||
DecimalDigits ::
|
||||
...
|
||||
DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
10_
|
|
@ -1,26 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
NumericLiteralSeparator may not appear adjacent to ExponentPart
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalLiteral ::
|
||||
DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt
|
||||
|
||||
DecimalDigits ::
|
||||
...
|
||||
DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
10.0_e1
|
|
@ -1,29 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
NumericLiteralSeparator may not appear between `.` and ExponentPart
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalLiteral ::
|
||||
DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt
|
||||
|
||||
DecimalDigits ::
|
||||
...
|
||||
DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
ExponentIndicator :: one of
|
||||
e E
|
||||
|
||||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
10._e1
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
NumericLiteralSeparator may not be the last digit character of a
|
||||
DecimalLiteral
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalLiteral ::
|
||||
DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt
|
||||
|
||||
DecimalDigits ::
|
||||
...
|
||||
DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
10._
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`.` DecimalDigit NumericLiteralSeparator DecimalDigit ExponentPart
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalLiteral ::
|
||||
. DecimalDigits ExponentPart_opt
|
||||
|
||||
DecimalDigits ::
|
||||
DecimalDigit
|
||||
...
|
||||
DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
ExponentIndicator :: one of
|
||||
e E
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(.0_1e2, .01e2);
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`.` DecimalDigit NumericLiteralSeparator DecimalDigits ExponentPart
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalLiteral ::
|
||||
. DecimalDigits ExponentPart_opt
|
||||
|
||||
DecimalDigits ::
|
||||
DecimalDigit
|
||||
...
|
||||
DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
ExponentIndicator :: one of
|
||||
e E
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(.1_01e2, .101e2);
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`.` DecimalDigits NumericLiteralSeparator DecimalDigit ExponentPart
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalLiteral ::
|
||||
. DecimalDigits ExponentPart_opt
|
||||
|
||||
DecimalDigits ::
|
||||
DecimalDigit
|
||||
...
|
||||
DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
ExponentIndicator :: one of
|
||||
e E
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(.10_1e2, .101e2);
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`.` DecimalDigits NumericLiteralSeparator DecimalDigits ExponentPart
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalLiteral ::
|
||||
. DecimalDigits ExponentPart_opt
|
||||
|
||||
DecimalDigits ::
|
||||
DecimalDigit
|
||||
...
|
||||
DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
ExponentIndicator :: one of
|
||||
e E
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(.00_01e2, .0001e2);
|
|
@ -1,28 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: NumericLiteralSeparator may not appear adjacent to ExponentPart
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalLiteral ::
|
||||
. DecimalDigits ExponentPart_opt
|
||||
|
||||
DecimalDigits ::
|
||||
...
|
||||
DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
ExponentIndicator :: one of
|
||||
e E
|
||||
|
||||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
.0_e1
|
|
@ -1,29 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
NumericLiteralSeparator may not appear between `.` and ExponentPart
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalLiteral ::
|
||||
. DecimalDigits ExponentPart_opt
|
||||
|
||||
DecimalDigits ::
|
||||
...
|
||||
DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
ExponentIndicator :: one of
|
||||
e E
|
||||
|
||||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
._e1
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
NumericLiteralSeparator may not be the last digit character of a
|
||||
DecimalLiteral, nor adjacent to `.`
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalLiteral ::
|
||||
. DecimalDigits ExponentPart_opt
|
||||
|
||||
DecimalDigits ::
|
||||
...
|
||||
DecimalDigits NumericLiteralSeparator DecimalDigit
|
||||
|
||||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
._
|
|
@ -1,32 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
NumericLiteralSeparator may not be the appear adjacent to `0x` | `0X` in a
|
||||
HexIntegerLiteral
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
HexIntegerLiteral ::
|
||||
0x HexDigits
|
||||
0X HexDigits
|
||||
|
||||
HexDigits ::
|
||||
HexDigit
|
||||
HexDigits HexDigit
|
||||
HexDigits NumericLiteralSeparator HexDigit
|
||||
|
||||
HexDigit::one of
|
||||
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F
|
||||
|
||||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
0x_1
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`0x` | `0X` HexDigit NumericLiteralSeparator HexDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
HexIntegerLiteral ::
|
||||
0x HexDigits
|
||||
0X HexDigits
|
||||
|
||||
HexDigits ::
|
||||
HexDigit
|
||||
HexDigits HexDigit
|
||||
HexDigits NumericLiteralSeparator HexDigit
|
||||
|
||||
HexDigit::one of
|
||||
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(0x0_1, 0x01);
|
||||
assert.sameValue(0X0_1, 0X01);
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`0x` | `0X` HexDigit NumericLiteralSeparator HexDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
HexIntegerLiteral ::
|
||||
0x HexDigits
|
||||
0X HexDigits
|
||||
|
||||
HexDigits ::
|
||||
HexDigit
|
||||
HexDigits HexDigit
|
||||
HexDigits NumericLiteralSeparator HexDigit
|
||||
|
||||
HexDigit::one of
|
||||
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(0x0_10, 0x010);
|
||||
assert.sameValue(0X0_10, 0X010);
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`0x` | `0X` HexDigits NumericLiteralSeparator HexDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
HexIntegerLiteral ::
|
||||
0x HexDigits
|
||||
0X HexDigits
|
||||
|
||||
HexDigits ::
|
||||
HexDigit
|
||||
HexDigits HexDigit
|
||||
HexDigits NumericLiteralSeparator HexDigit
|
||||
|
||||
HexDigit::one of
|
||||
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(0x01_0, 0x010);
|
||||
assert.sameValue(0X01_0, 0X010);
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`0x` | `0X` HexDigits NumericLiteralSeparator HexDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
HexIntegerLiteral ::
|
||||
0x HexDigits
|
||||
0X HexDigits
|
||||
|
||||
HexDigits ::
|
||||
HexDigit
|
||||
HexDigits HexDigit
|
||||
HexDigits NumericLiteralSeparator HexDigit
|
||||
|
||||
HexDigit::one of
|
||||
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(0x01_00, 0x0100);
|
||||
assert.sameValue(0X01_00, 0X0100);
|
|
@ -1,32 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
NumericLiteralSeparator may not appear adjacent to another
|
||||
NumericLiteralSeparator in a HexIntegerLiteral
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
HexIntegerLiteral ::
|
||||
0x HexDigits
|
||||
0X HexDigits
|
||||
|
||||
HexDigits ::
|
||||
HexDigit
|
||||
HexDigits HexDigit
|
||||
HexDigits NumericLiteralSeparator HexDigit
|
||||
|
||||
HexDigit::one of
|
||||
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F
|
||||
|
||||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
0x0__0
|
|
@ -1,32 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
NumericLiteralSeparator may not be the last digit character of a
|
||||
HexIntegerLiteral
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
HexIntegerLiteral ::
|
||||
0x HexDigits
|
||||
0X HexDigits
|
||||
|
||||
HexDigits ::
|
||||
HexDigit
|
||||
HexDigits HexDigit
|
||||
HexDigits NumericLiteralSeparator HexDigit
|
||||
|
||||
HexDigit::one of
|
||||
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F
|
||||
|
||||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
0x0_
|
|
@ -1,47 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
`0x` | `0X` HexDigit NumericLiteralSeparator HexDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
HexIntegerLiteral ::
|
||||
0x HexDigits
|
||||
0X HexDigits
|
||||
|
||||
HexDigits ::
|
||||
HexDigit
|
||||
HexDigits HexDigit
|
||||
HexDigits NumericLiteralSeparator HexDigit
|
||||
|
||||
HexDigit::one of
|
||||
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(0x0_0, 0x00);
|
||||
assert.sameValue(0x1_1, 0x11);
|
||||
assert.sameValue(0x2_2, 0x22);
|
||||
assert.sameValue(0x3_3, 0x33);
|
||||
assert.sameValue(0x4_4, 0x44);
|
||||
assert.sameValue(0x5_5, 0x55);
|
||||
assert.sameValue(0x6_6, 0x66);
|
||||
assert.sameValue(0x7_7, 0x77);
|
||||
assert.sameValue(0x8_8, 0x88);
|
||||
assert.sameValue(0x9_9, 0x99);
|
||||
assert.sameValue(0xa_a, 0xaa);
|
||||
assert.sameValue(0xb_b, 0xbb);
|
||||
assert.sameValue(0xc_c, 0xcc);
|
||||
assert.sameValue(0xd_d, 0xdd);
|
||||
assert.sameValue(0xe_e, 0xee);
|
||||
assert.sameValue(0xf_f, 0xff);
|
||||
assert.sameValue(0xA_A, 0xAA);
|
||||
assert.sameValue(0xB_B, 0xBB);
|
||||
assert.sameValue(0xC_C, 0xCC);
|
||||
assert.sameValue(0xD_D, 0xDD);
|
||||
assert.sameValue(0xE_E, 0xEE);
|
||||
assert.sameValue(0xF_F, 0xFF);
|
|
@ -1,38 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: NonZeroDigit NumericLiteralSeparator DecimalDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalIntegerLiteral ::
|
||||
...
|
||||
NonZeroDigit NumericLiteralSeparator_opt DecimalDigits
|
||||
|
||||
NonZeroDigit :: one of
|
||||
1 2 3 4 5 6 7 8 9
|
||||
|
||||
DecimalDigits ::
|
||||
DecimalDigit
|
||||
...
|
||||
|
||||
DecimalDigit :: one of
|
||||
0 1 2 3 4 5 6 7 8 9
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(1_0, 10);
|
||||
assert.sameValue(1_1, 11);
|
||||
assert.sameValue(2_2, 22);
|
||||
assert.sameValue(3_3, 33);
|
||||
assert.sameValue(4_4, 44);
|
||||
assert.sameValue(5_5, 55);
|
||||
assert.sameValue(6_6, 66);
|
||||
assert.sameValue(7_7, 77);
|
||||
assert.sameValue(8_8, 88);
|
||||
assert.sameValue(9_9, 99);
|
||||
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: NonZeroDigit NumericLiteralSeparator DecimalDigit
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalIntegerLiteral ::
|
||||
...
|
||||
NonZeroDigit NumericLiteralSeparator_opt DecimalDigits
|
||||
|
||||
NonZeroDigit :: one of
|
||||
1 2 3 4 5 6 7 8 9
|
||||
|
||||
DecimalDigits ::
|
||||
...
|
||||
DecimalDigits DecimalDigit
|
||||
...
|
||||
|
||||
---*/
|
||||
|
||||
assert.sameValue(1_1, 11);
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: >
|
||||
NumericLiteralSeparator may not appear adjacent to another
|
||||
NumericLiteralSeparator in DecimalIntegerLiteral
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalIntegerLiteral ::
|
||||
...
|
||||
NonZeroDigit NumericLiteralSeparator_opt DecimalDigits
|
||||
|
||||
NonZeroDigit :: one of
|
||||
1 2 3 4 5 6 7 8 9
|
||||
|
||||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
0__0123456789
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: prod-NumericLiteralSeparator
|
||||
description: NonZeroDigit NumericLiteralSeparator DecimalDigits
|
||||
info: |
|
||||
NumericLiteralSeparator ::
|
||||
_
|
||||
|
||||
DecimalIntegerLiteral ::
|
||||
...
|
||||
NonZeroDigit NumericLiteralSeparator DecimalDigits
|
||||
|
||||
NonZeroDigit :: one of
|
||||
1 2 3 4 5 6 7 8 9
|
||||
|
||||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
0_0123456789
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue