tor-browser

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

same-value-x-y-symbol.js (613B)


      1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 es6id: 19.1.2.10
      5 description: >
      6    Object.is ( value1, value2 )
      7 
      8    ...
      9    6. If Type(x) is Symbol, then
     10      a. If x and y are both the same Symbol value, 
     11          return true; otherwise, return false.
     12    ...
     13 features: [Symbol]
     14 ---*/
     15 
     16 var a = Symbol();
     17 var b = Symbol("description");
     18 
     19 assert.sameValue(Object.is(a, a), true, "`Object.is(a, a)` returns `true`");
     20 assert.sameValue(Object.is(b, b), true, "`Object.is(b, b)` returns `true`");
     21 
     22 reportCompare(0, 0);