mirror of
https://github.com/tc39/test262.git
synced 2025-07-06 13:44:40 +02:00
Add tests for Numeric Separators not allowed in legacy octal and non octal literals
This commit is contained in:
parent
edeada5376
commit
b6760c3cc0
@ -0,0 +1,41 @@
|
|||||||
|
// Copyright (C) 2019 Leo Balter. 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 in a LegacyOctalLikeDecimalIntegerLiteral (00_0)
|
||||||
|
info: |
|
||||||
|
NumericLiteralSeparator ::
|
||||||
|
_
|
||||||
|
|
||||||
|
DecimalIntegerLiteral ::
|
||||||
|
0
|
||||||
|
NonZeroDigit DecimalDigitsopt
|
||||||
|
NonZeroDigit
|
||||||
|
NonZeroDigit NumericLiteralSeparator_opt DecimalDigits
|
||||||
|
NonOctalDecimalIntegerLiteral
|
||||||
|
|
||||||
|
NonOctalDecimalIntegerLiteral ::
|
||||||
|
0 NonOctalDigit
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit
|
||||||
|
NonOctalDecimalIntegerLiteral DecimalDigit
|
||||||
|
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral ::
|
||||||
|
0 OctalDigit
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral OctalDigit
|
||||||
|
|
||||||
|
NonOctalDigit::one of
|
||||||
|
8 9
|
||||||
|
|
||||||
|
OctalDigit::one of
|
||||||
|
0 1 2 3 4 5 6 7
|
||||||
|
negative:
|
||||||
|
phase: parse
|
||||||
|
type: SyntaxError
|
||||||
|
features: [numeric-separator-literal]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
$DONOTEVALUATE();
|
||||||
|
|
||||||
|
00_0;
|
@ -0,0 +1,41 @@
|
|||||||
|
// Copyright (C) 2019 Leo Balter. 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 in a LegacyOctalLikeDecimalIntegerLiteral (01_0)
|
||||||
|
info: |
|
||||||
|
NumericLiteralSeparator ::
|
||||||
|
_
|
||||||
|
|
||||||
|
DecimalIntegerLiteral ::
|
||||||
|
0
|
||||||
|
NonZeroDigit DecimalDigitsopt
|
||||||
|
NonZeroDigit
|
||||||
|
NonZeroDigit NumericLiteralSeparator_opt DecimalDigits
|
||||||
|
NonOctalDecimalIntegerLiteral
|
||||||
|
|
||||||
|
NonOctalDecimalIntegerLiteral ::
|
||||||
|
0 NonOctalDigit
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit
|
||||||
|
NonOctalDecimalIntegerLiteral DecimalDigit
|
||||||
|
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral ::
|
||||||
|
0 OctalDigit
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral OctalDigit
|
||||||
|
|
||||||
|
NonOctalDigit::one of
|
||||||
|
8 9
|
||||||
|
|
||||||
|
OctalDigit::one of
|
||||||
|
0 1 2 3 4 5 6 7
|
||||||
|
negative:
|
||||||
|
phase: parse
|
||||||
|
type: SyntaxError
|
||||||
|
features: [numeric-separator-literal]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
$DONOTEVALUATE();
|
||||||
|
|
||||||
|
01_0;
|
@ -0,0 +1,43 @@
|
|||||||
|
// Copyright (C) 2019 Leo Balter. All rights reserved.
|
||||||
|
// Copyright (C) 2019 Leo Balter. 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 in a LegacyOctalLikeDecimalIntegerLiteral (07_0)
|
||||||
|
)
|
||||||
|
info: |
|
||||||
|
NumericLiteralSeparator ::
|
||||||
|
_
|
||||||
|
|
||||||
|
DecimalIntegerLiteral ::
|
||||||
|
0
|
||||||
|
NonZeroDigit DecimalDigitsopt
|
||||||
|
NonZeroDigit
|
||||||
|
NonZeroDigit NumericLiteralSeparator_opt DecimalDigits
|
||||||
|
NonOctalDecimalIntegerLiteral
|
||||||
|
|
||||||
|
NonOctalDecimalIntegerLiteral ::
|
||||||
|
0 NonOctalDigit
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit
|
||||||
|
NonOctalDecimalIntegerLiteral DecimalDigit
|
||||||
|
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral ::
|
||||||
|
0 OctalDigit
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral OctalDigit
|
||||||
|
|
||||||
|
NonOctalDigit::one of
|
||||||
|
8 9
|
||||||
|
|
||||||
|
OctalDigit::one of
|
||||||
|
0 1 2 3 4 5 6 7
|
||||||
|
negative:
|
||||||
|
phase: parse
|
||||||
|
type: SyntaxError
|
||||||
|
features: [numeric-separator-literal]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
$DONOTEVALUATE();
|
||||||
|
|
||||||
|
07_0;
|
@ -0,0 +1,41 @@
|
|||||||
|
// Copyright (C) 2019 Leo Balter. 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 in a LegacyOctalLikeDecimalIntegerLiteral (0_0)
|
||||||
|
info: |
|
||||||
|
NumericLiteralSeparator ::
|
||||||
|
_
|
||||||
|
|
||||||
|
DecimalIntegerLiteral ::
|
||||||
|
0
|
||||||
|
NonZeroDigit DecimalDigitsopt
|
||||||
|
NonZeroDigit
|
||||||
|
NonZeroDigit NumericLiteralSeparator_opt DecimalDigits
|
||||||
|
NonOctalDecimalIntegerLiteral
|
||||||
|
|
||||||
|
NonOctalDecimalIntegerLiteral ::
|
||||||
|
0 NonOctalDigit
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit
|
||||||
|
NonOctalDecimalIntegerLiteral DecimalDigit
|
||||||
|
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral ::
|
||||||
|
0 OctalDigit
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral OctalDigit
|
||||||
|
|
||||||
|
NonOctalDigit::one of
|
||||||
|
8 9
|
||||||
|
|
||||||
|
OctalDigit::one of
|
||||||
|
0 1 2 3 4 5 6 7
|
||||||
|
negative:
|
||||||
|
phase: parse
|
||||||
|
type: SyntaxError
|
||||||
|
features: [numeric-separator-literal]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
$DONOTEVALUATE();
|
||||||
|
|
||||||
|
0_0;
|
@ -0,0 +1,41 @@
|
|||||||
|
// Copyright (C) 2019 Leo Balter. 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 in a LegacyOctalLikeDecimalIntegerLiteral (0_1)
|
||||||
|
info: |
|
||||||
|
NumericLiteralSeparator ::
|
||||||
|
_
|
||||||
|
|
||||||
|
DecimalIntegerLiteral ::
|
||||||
|
0
|
||||||
|
NonZeroDigit DecimalDigitsopt
|
||||||
|
NonZeroDigit
|
||||||
|
NonZeroDigit NumericLiteralSeparator_opt DecimalDigits
|
||||||
|
NonOctalDecimalIntegerLiteral
|
||||||
|
|
||||||
|
NonOctalDecimalIntegerLiteral ::
|
||||||
|
0 NonOctalDigit
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit
|
||||||
|
NonOctalDecimalIntegerLiteral DecimalDigit
|
||||||
|
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral ::
|
||||||
|
0 OctalDigit
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral OctalDigit
|
||||||
|
|
||||||
|
NonOctalDigit::one of
|
||||||
|
8 9
|
||||||
|
|
||||||
|
OctalDigit::one of
|
||||||
|
0 1 2 3 4 5 6 7
|
||||||
|
negative:
|
||||||
|
phase: parse
|
||||||
|
type: SyntaxError
|
||||||
|
features: [numeric-separator-literal]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
$DONOTEVALUATE();
|
||||||
|
|
||||||
|
0_0;
|
@ -0,0 +1,42 @@
|
|||||||
|
// Copyright (C) 2019 Leo Balter. 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 in a LegacyOctalLikeDecimalIntegerLiteral (0_7)
|
||||||
|
)
|
||||||
|
info: |
|
||||||
|
NumericLiteralSeparator ::
|
||||||
|
_
|
||||||
|
|
||||||
|
DecimalIntegerLiteral ::
|
||||||
|
0
|
||||||
|
NonZeroDigit DecimalDigitsopt
|
||||||
|
NonZeroDigit
|
||||||
|
NonZeroDigit NumericLiteralSeparator_opt DecimalDigits
|
||||||
|
NonOctalDecimalIntegerLiteral
|
||||||
|
|
||||||
|
NonOctalDecimalIntegerLiteral ::
|
||||||
|
0 NonOctalDigit
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit
|
||||||
|
NonOctalDecimalIntegerLiteral DecimalDigit
|
||||||
|
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral ::
|
||||||
|
0 OctalDigit
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral OctalDigit
|
||||||
|
|
||||||
|
NonOctalDigit::one of
|
||||||
|
8 9
|
||||||
|
|
||||||
|
OctalDigit::one of
|
||||||
|
0 1 2 3 4 5 6 7
|
||||||
|
negative:
|
||||||
|
phase: parse
|
||||||
|
type: SyntaxError
|
||||||
|
features: [numeric-separator-literal]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
$DONOTEVALUATE();
|
||||||
|
|
||||||
|
0_7;
|
@ -0,0 +1,38 @@
|
|||||||
|
// Copyright (C) 2019 Leo Balter. 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 in a NonOctalDecimalIntegerLiteral (08)
|
||||||
|
info: |
|
||||||
|
NumericLiteralSeparator ::
|
||||||
|
_
|
||||||
|
|
||||||
|
DecimalIntegerLiteral ::
|
||||||
|
0
|
||||||
|
NonZeroDigit DecimalDigitsopt
|
||||||
|
NonZeroDigit
|
||||||
|
NonZeroDigit NumericLiteralSeparator_opt DecimalDigits
|
||||||
|
NonOctalDecimalIntegerLiteral
|
||||||
|
|
||||||
|
NonOctalDecimalIntegerLiteral ::
|
||||||
|
0 NonOctalDigit
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit
|
||||||
|
NonOctalDecimalIntegerLiteral DecimalDigit
|
||||||
|
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral ::
|
||||||
|
0 OctalDigit
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral OctalDigit
|
||||||
|
|
||||||
|
NonOctalDigit::one of
|
||||||
|
8 9
|
||||||
|
negative:
|
||||||
|
phase: parse
|
||||||
|
type: SyntaxError
|
||||||
|
features: [numeric-separator-literal]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
$DONOTEVALUATE();
|
||||||
|
|
||||||
|
08_0;
|
@ -0,0 +1,38 @@
|
|||||||
|
// Copyright (C) 2019 Leo Balter. 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 in a NonOctalDecimalIntegerLiteral (09)
|
||||||
|
info: |
|
||||||
|
NumericLiteralSeparator ::
|
||||||
|
_
|
||||||
|
|
||||||
|
DecimalIntegerLiteral ::
|
||||||
|
0
|
||||||
|
NonZeroDigit DecimalDigitsopt
|
||||||
|
NonZeroDigit
|
||||||
|
NonZeroDigit NumericLiteralSeparator_opt DecimalDigits
|
||||||
|
NonOctalDecimalIntegerLiteral
|
||||||
|
|
||||||
|
NonOctalDecimalIntegerLiteral ::
|
||||||
|
0 NonOctalDigit
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit
|
||||||
|
NonOctalDecimalIntegerLiteral DecimalDigit
|
||||||
|
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral ::
|
||||||
|
0 OctalDigit
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral OctalDigit
|
||||||
|
|
||||||
|
NonOctalDigit::one of
|
||||||
|
8 9
|
||||||
|
negative:
|
||||||
|
phase: parse
|
||||||
|
type: SyntaxError
|
||||||
|
features: [numeric-separator-literal]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
$DONOTEVALUATE();
|
||||||
|
|
||||||
|
09_0;
|
@ -0,0 +1,38 @@
|
|||||||
|
// Copyright (C) 2019 Leo Balter. 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 in a NonOctalDecimalIntegerLiteral (0_8)
|
||||||
|
info: |
|
||||||
|
NumericLiteralSeparator ::
|
||||||
|
_
|
||||||
|
|
||||||
|
DecimalIntegerLiteral ::
|
||||||
|
0
|
||||||
|
NonZeroDigit DecimalDigitsopt
|
||||||
|
NonZeroDigit
|
||||||
|
NonZeroDigit NumericLiteralSeparator_opt DecimalDigits
|
||||||
|
NonOctalDecimalIntegerLiteral
|
||||||
|
|
||||||
|
NonOctalDecimalIntegerLiteral ::
|
||||||
|
0 NonOctalDigit
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit
|
||||||
|
NonOctalDecimalIntegerLiteral DecimalDigit
|
||||||
|
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral ::
|
||||||
|
0 OctalDigit
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral OctalDigit
|
||||||
|
|
||||||
|
NonOctalDigit::one of
|
||||||
|
8 9
|
||||||
|
negative:
|
||||||
|
phase: parse
|
||||||
|
type: SyntaxError
|
||||||
|
features: [numeric-separator-literal]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
$DONOTEVALUATE();
|
||||||
|
|
||||||
|
0_8;
|
@ -0,0 +1,38 @@
|
|||||||
|
// Copyright (C) 2019 Leo Balter. 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 in a NonOctalDecimalIntegerLiteral (0_9)
|
||||||
|
info: |
|
||||||
|
NumericLiteralSeparator ::
|
||||||
|
_
|
||||||
|
|
||||||
|
DecimalIntegerLiteral ::
|
||||||
|
0
|
||||||
|
NonZeroDigit DecimalDigitsopt
|
||||||
|
NonZeroDigit
|
||||||
|
NonZeroDigit NumericLiteralSeparator_opt DecimalDigits
|
||||||
|
NonOctalDecimalIntegerLiteral
|
||||||
|
|
||||||
|
NonOctalDecimalIntegerLiteral ::
|
||||||
|
0 NonOctalDigit
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit
|
||||||
|
NonOctalDecimalIntegerLiteral DecimalDigit
|
||||||
|
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral ::
|
||||||
|
0 OctalDigit
|
||||||
|
LegacyOctalLikeDecimalIntegerLiteral OctalDigit
|
||||||
|
|
||||||
|
NonOctalDigit::one of
|
||||||
|
8 9
|
||||||
|
negative:
|
||||||
|
phase: parse
|
||||||
|
type: SyntaxError
|
||||||
|
features: [numeric-separator-literal]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
$DONOTEVALUATE();
|
||||||
|
|
||||||
|
0_9;
|
Loading…
x
Reference in New Issue
Block a user