tor-browser

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

verifyProperty-same-value.js (487B)


      1 // Copyright (C) 2019 Aleksey Shvayka. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 description: >
      5  verifyProperty uses SameValue for value comparison.
      6 includes: [propertyHelper.js]
      7 ---*/
      8 
      9 var obj = {
     10  a: NaN,
     11  b: -0,
     12 };
     13 
     14 assert(verifyProperty(obj, 'a', { value: NaN }));
     15 assert(verifyProperty(obj, 'b', { value: -0 }));
     16 
     17 assert.throws(Test262Error, function() {
     18  verifyProperty(obj, 'b', { value: 0 });
     19 });
     20 
     21 reportCompare(0, 0);