tor-browser

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

S15.7.2.1_A3.js (552B)


      1 // Copyright 2009 the Sputnik authors.  All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 info: |
      6    The [[Value]] property of the newly constructed object
      7    is set to ToNumber(value) if value was supplied, else to +0
      8 es5id: 15.7.2.1_A3
      9 description: Checking value of the newly created object
     10 ---*/
     11 
     12 var x1 = new Number(1);
     13 assert.sameValue(x1.valueOf(), 1, 'x1.valueOf() must return 1');
     14 
     15 var x2 = new Number();
     16 assert.sameValue(x2.valueOf(), 0, 'x2.valueOf() must return 0');
     17 
     18 reportCompare(0, 0);