mirror of
https://github.com/tc39/test262.git
synced 2025-07-21 21:14:45 +02:00
Add tests for BigInt disallowed in LegacyOctalLike and NonOctal literals (#2253)
Ref https://github.com/tc39/proposal-bigint/issues/208
This commit is contained in:
parent
7f1116982d
commit
1affd0ccd5
@ -0,0 +1,28 @@
|
|||||||
|
// Copyright (C) 2019 Leo Balter. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: prod-NumericLiteral
|
||||||
|
description: >
|
||||||
|
The BigInt suffix is disallowed in LegacyOctalIntegerLiteral
|
||||||
|
info: |
|
||||||
|
NumericLiteral ::
|
||||||
|
DecimalIntegerLiteral BigIntLiteralSuffix
|
||||||
|
NumericLiteralBase BigIntLiteralSuffix
|
||||||
|
LegacyOctalIntegerLiteral
|
||||||
|
|
||||||
|
NumericLiteralBase ::
|
||||||
|
BinaryIntegerLiteral
|
||||||
|
OctalIntegerLiteral
|
||||||
|
HexIntegerLiteral
|
||||||
|
|
||||||
|
BigIntLiteralSuffix :: n
|
||||||
|
features: [BigInt]
|
||||||
|
negative:
|
||||||
|
phase: parse
|
||||||
|
type: SyntaxError
|
||||||
|
---*/
|
||||||
|
|
||||||
|
$DONOTEVALUATE();
|
||||||
|
|
||||||
|
00n;
|
@ -0,0 +1,28 @@
|
|||||||
|
// Copyright (C) 2019 Leo Balter. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: prod-NumericLiteral
|
||||||
|
description: >
|
||||||
|
The BigInt suffix is disallowed in LegacyOctalIntegerLiteral
|
||||||
|
info: |
|
||||||
|
NumericLiteral ::
|
||||||
|
DecimalIntegerLiteral BigIntLiteralSuffix
|
||||||
|
NumericLiteralBase BigIntLiteralSuffix
|
||||||
|
LegacyOctalIntegerLiteral
|
||||||
|
|
||||||
|
NumericLiteralBase ::
|
||||||
|
BinaryIntegerLiteral
|
||||||
|
OctalIntegerLiteral
|
||||||
|
HexIntegerLiteral
|
||||||
|
|
||||||
|
BigIntLiteralSuffix :: n
|
||||||
|
features: [BigInt]
|
||||||
|
negative:
|
||||||
|
phase: parse
|
||||||
|
type: SyntaxError
|
||||||
|
---*/
|
||||||
|
|
||||||
|
$DONOTEVALUATE();
|
||||||
|
|
||||||
|
01n;
|
@ -0,0 +1,28 @@
|
|||||||
|
// Copyright (C) 2019 Leo Balter. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: prod-NumericLiteral
|
||||||
|
description: >
|
||||||
|
The BigInt suffix is disallowed in LegacyOctalIntegerLiteral
|
||||||
|
info: |
|
||||||
|
NumericLiteral ::
|
||||||
|
DecimalIntegerLiteral BigIntLiteralSuffix
|
||||||
|
NumericLiteralBase BigIntLiteralSuffix
|
||||||
|
LegacyOctalIntegerLiteral
|
||||||
|
|
||||||
|
NumericLiteralBase ::
|
||||||
|
BinaryIntegerLiteral
|
||||||
|
OctalIntegerLiteral
|
||||||
|
HexIntegerLiteral
|
||||||
|
|
||||||
|
BigIntLiteralSuffix :: n
|
||||||
|
features: [BigInt]
|
||||||
|
negative:
|
||||||
|
phase: parse
|
||||||
|
type: SyntaxError
|
||||||
|
---*/
|
||||||
|
|
||||||
|
$DONOTEVALUATE();
|
||||||
|
|
||||||
|
07n;
|
@ -0,0 +1,28 @@
|
|||||||
|
// Copyright (C) 2019 Leo Balter. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: prod-NumericLiteral
|
||||||
|
description: >
|
||||||
|
The BigInt suffix is disallowed in NonOctalDecimalIntegerLiteral
|
||||||
|
info: |
|
||||||
|
NumericLiteral ::
|
||||||
|
DecimalIntegerLiteral BigIntLiteralSuffix
|
||||||
|
|
||||||
|
https://github.com/tc39/proposal-bigint/issues/208
|
||||||
|
|
||||||
|
NumericLiteral ::
|
||||||
|
DecimalBigIntegerLiteral
|
||||||
|
|
||||||
|
DecimalBigIntegerLiteral ::
|
||||||
|
0 BigIntLiteralSuffix
|
||||||
|
NonZeroDigit DecimalDigits_opt BigIntLiteralSuffix
|
||||||
|
features: [BigInt]
|
||||||
|
negative:
|
||||||
|
phase: parse
|
||||||
|
type: SyntaxError
|
||||||
|
---*/
|
||||||
|
|
||||||
|
$DONOTEVALUATE();
|
||||||
|
|
||||||
|
0008n;
|
@ -0,0 +1,28 @@
|
|||||||
|
// Copyright (C) 2019 Leo Balter. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: prod-NumericLiteral
|
||||||
|
description: >
|
||||||
|
The BigInt suffix is disallowed in NonOctalDecimalIntegerLiteral
|
||||||
|
info: |
|
||||||
|
NumericLiteral ::
|
||||||
|
DecimalIntegerLiteral BigIntLiteralSuffix
|
||||||
|
|
||||||
|
https://github.com/tc39/proposal-bigint/issues/208
|
||||||
|
|
||||||
|
NumericLiteral ::
|
||||||
|
DecimalBigIntegerLiteral
|
||||||
|
|
||||||
|
DecimalBigIntegerLiteral ::
|
||||||
|
0 BigIntLiteralSuffix
|
||||||
|
NonZeroDigit DecimalDigits_opt BigIntLiteralSuffix
|
||||||
|
features: [BigInt]
|
||||||
|
negative:
|
||||||
|
phase: parse
|
||||||
|
type: SyntaxError
|
||||||
|
---*/
|
||||||
|
|
||||||
|
$DONOTEVALUATE();
|
||||||
|
|
||||||
|
012348n;
|
28
test/language/literals/bigint/non-octal-like-invalid-08n.js
Normal file
28
test/language/literals/bigint/non-octal-like-invalid-08n.js
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
// Copyright (C) 2019 Leo Balter. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: prod-NumericLiteral
|
||||||
|
description: >
|
||||||
|
The BigInt suffix is disallowed in NonOctalDecimalIntegerLiteral
|
||||||
|
info: |
|
||||||
|
NumericLiteral ::
|
||||||
|
DecimalIntegerLiteral BigIntLiteralSuffix
|
||||||
|
|
||||||
|
https://github.com/tc39/proposal-bigint/issues/208
|
||||||
|
|
||||||
|
NumericLiteral ::
|
||||||
|
DecimalBigIntegerLiteral
|
||||||
|
|
||||||
|
DecimalBigIntegerLiteral ::
|
||||||
|
0 BigIntLiteralSuffix
|
||||||
|
NonZeroDigit DecimalDigits_opt BigIntLiteralSuffix
|
||||||
|
features: [BigInt]
|
||||||
|
negative:
|
||||||
|
phase: parse
|
||||||
|
type: SyntaxError
|
||||||
|
---*/
|
||||||
|
|
||||||
|
$DONOTEVALUATE();
|
||||||
|
|
||||||
|
08n;
|
28
test/language/literals/bigint/non-octal-like-invalid-09n.js
Normal file
28
test/language/literals/bigint/non-octal-like-invalid-09n.js
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
// Copyright (C) 2019 Leo Balter. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: prod-NumericLiteral
|
||||||
|
description: >
|
||||||
|
The BigInt suffix is disallowed in NonOctalDecimalIntegerLiteral
|
||||||
|
info: |
|
||||||
|
NumericLiteral ::
|
||||||
|
DecimalIntegerLiteral BigIntLiteralSuffix
|
||||||
|
|
||||||
|
https://github.com/tc39/proposal-bigint/issues/208
|
||||||
|
|
||||||
|
NumericLiteral ::
|
||||||
|
DecimalBigIntegerLiteral
|
||||||
|
|
||||||
|
DecimalBigIntegerLiteral ::
|
||||||
|
0 BigIntLiteralSuffix
|
||||||
|
NonZeroDigit DecimalDigits_opt BigIntLiteralSuffix
|
||||||
|
features: [BigInt]
|
||||||
|
negative:
|
||||||
|
phase: parse
|
||||||
|
type: SyntaxError
|
||||||
|
---*/
|
||||||
|
|
||||||
|
$DONOTEVALUATE();
|
||||||
|
|
||||||
|
09n;
|
Loading…
x
Reference in New Issue
Block a user