summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/literals/bigint/numeric-separators/numeric-separator-literal-nzd-nsl-dd-one-of.js
blob: 9b3337e8e5f66611ec1ee0c0fe40ba35e314ca65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// 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: NonZeroDigit NumericLiteralSeparator DecimalDigit
info: |
  NumericLiteral ::
    DecimalIntegerLiteral BigIntLiteralSuffix
    NumericLiteralBase BigIntLiteralSuffix

  NumericLiteralBase ::
    BinaryIntegerLiteral
    OctalIntegerLiteral
    HexIntegerLiteral

  BigIntLiteralSuffix :: n

  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

features: [BigInt, numeric-separator-literal]
---*/

assert.sameValue(1_0n, 10n);
assert.sameValue(1_1n, 11n);
assert.sameValue(2_2n, 22n);
assert.sameValue(3_3n, 33n);
assert.sameValue(4_4n, 44n);
assert.sameValue(5_5n, 55n);
assert.sameValue(6_6n, 66n);
assert.sameValue(7_7n, 77n);
assert.sameValue(8_8n, 88n);
assert.sameValue(9_9n, 99n);



reportCompare(0, 0);