tor-browser

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

string-numeric-separator-literal-hil-hd-nsl-hds.js (771B)


      1 // Copyright (C) 2017 the V8 project authors. 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: NumericLiteralSeparator is not valid on string conversions for ToNumber operations
      7 info: |
      8  `0x` | `0X` HexDigit NumericLiteralSeparator HexDigit
      9 
     10  NumericLiteralSeparator ::
     11    _
     12 
     13  HexIntegerLiteral ::
     14    0x HexDigits
     15    0X HexDigits
     16 
     17  HexDigits ::
     18    HexDigit
     19    HexDigits HexDigit
     20    HexDigits NumericLiteralSeparator HexDigit
     21 
     22  HexDigit::one of
     23    0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F
     24 
     25 features: [numeric-separator-literal]
     26 ---*/
     27 
     28 assert.sameValue(Number("0x0_10"), NaN, "0x0_10");
     29 assert.sameValue(Number("0X0_10"), NaN, "0X0_10");
     30 
     31 reportCompare(0, 0);