tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

numeric-separator-literal-dds-nsl-dd.js (1118B)


      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: DecimalDigits 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  DecimalDigits ::
     23    ...
     24    DecimalDigits NumericLiteralSeparator DecimalDigit
     25 
     26 features: [BigInt, numeric-separator-literal]
     27 ---*/
     28 
     29 assert.sameValue(123456789_0n, 1234567890n);
     30 assert.sameValue(123456789_1n, 1234567891n);
     31 assert.sameValue(123456789_2n, 1234567892n);
     32 assert.sameValue(123456789_3n, 1234567893n);
     33 assert.sameValue(123456789_4n, 1234567894n);
     34 assert.sameValue(123456789_5n, 1234567895n);
     35 assert.sameValue(123456789_6n, 1234567896n);
     36 assert.sameValue(123456789_7n, 1234567897n);
     37 assert.sameValue(123456789_8n, 1234567898n);
     38 assert.sameValue(123456789_9n, 1234567899n);
     39 
     40 reportCompare(0, 0);