Debian Codegraph @

js/src/tests/test262/language/literals/bigint/numeric-separators/numeric-separator-literal-nzd-nsl-dd-one-of.js

raw
1 // Copyright (C) 2019 Leo Balter. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 esid: prod-NumericLiteralSeparator
6 description: NonZeroDigit NumericLiteralSeparator DecimalDigit
7 info: |
8 NumericLiteral ::
9 DecimalIntegerLiteral BigIntLiteralSuffix
10 NumericLiteralBase BigIntLiteralSuffix
11
12 NumericLiteralBase ::
13 BinaryIntegerLiteral
14 OctalIntegerLiteral
15 HexIntegerLiteral
16
17 BigIntLiteralSuffix :: n
18
19 NumericLiteralSeparator ::
20 _
21
22 DecimalIntegerLiteral ::
23 ...
24 NonZeroDigit NumericLiteralSeparator_opt DecimalDigits
25
26 NonZeroDigit :: one of
27 1 2 3 4 5 6 7 8 9
28
29 DecimalDigits ::
30 DecimalDigit
31 ...
32
33 DecimalDigit :: one of
34 0 1 2 3 4 5 6 7 8 9
35
36 features: [BigInt, numeric-separator-literal]
37 ---*/
38
39 assert.sameValue(1_0n, 10n);
40 assert.sameValue(1_1n, 11n);
41 assert.sameValue(2_2n, 22n);
42 assert.sameValue(3_3n, 33n);
43 assert.sameValue(4_4n, 44n);
44 assert.sameValue(5_5n, 55n);
45 assert.sameValue(6_6n, 66n);
46 assert.sameValue(7_7n, 77n);
47 assert.sameValue(8_8n, 88n);
48 assert.sameValue(9_9n, 99n);
49
50
51
52 reportCompare(0, 0);