tor-browser

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

S9.3.1_A2_U180E.js (957B)


      1 // Copyright 2016 André Bargull. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 esid: sec-tonumber-applied-to-the-string-type
      6 description: >
      7  Ensure U+180E is not recognized as whitespace, convert to Number by explicit transformation
      8 info: |
      9  7.1.3.1 ToNumber Applied to the String Type
     10 
     11  If the grammar cannot interpret the String as an expansion of
     12  StringNumericLiteral, then the result of ToNumber is NaN.
     13 
     14  StringNumericLiteral :::
     15    StrWhiteSpace_opt StrNumericLiteral StrWhiteSpace_opt
     16  StrWhiteSpace :::
     17    StrWhiteSpaceChar StrWhiteSpace_opt
     18  StrWhiteSpaceChar :::
     19    WhiteSpace
     20    LineTerminator
     21  WhiteSpace ::
     22    <TAB>
     23    <VT>
     24    <FF>
     25    <SP>
     26    <NBSP>
     27    <ZWNBSP>
     28    <USP>
     29  <USP> ::
     30    Other category “Zs” code points
     31 features: [u180e]
     32 ---*/
     33 
     34 assert.sameValue(Number('\u180E'), NaN, 'Number("\\u180E") === NaN. Actual: ' + (Number("\u180E")));
     35 
     36 reportCompare(0, 0);