tor-browser

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

S15.2.2.1_A4_T3.js (814B)


      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    When the Object constructor is called with one argument value and
      7    the type of value is Boolean, return ToObject(boolean)
      8 es5id: 15.2.2.1_A4_T3
      9 description: Argument value is boolean expression
     10 ---*/
     11 
     12 var n_obj = new Object((1 === 1) && !(false));
     13 
     14 assert.sameValue(
     15  n_obj.constructor,
     16  Boolean,
     17  'The value of n_obj.constructor is expected to equal the value of Boolean'
     18 );
     19 
     20 assert.sameValue(typeof n_obj, 'object', 'The value of `typeof n_obj` is expected to be "object"');
     21 assert(n_obj == true, 'The result of evaluating (n_obj == true) is expected to be true');
     22 assert.notSameValue(n_obj, true, 'The value of n_obj is not true');
     23 
     24 reportCompare(0, 0);