tor-browser

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

S11.4.9_A2.1_T1.js (877B)


      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: Operator !x uses GetValue
      6 es5id: 11.4.9_A2.1_T1
      7 description: Either Type(x) is not Reference or GetBase(x) is not null
      8 ---*/
      9 
     10 //CHECK#1
     11 if (!true !== false) {
     12  throw new Test262Error('#1: !true === false');
     13 }
     14 
     15 //CHECK#2
     16 if (!(!true) !== true) {
     17  throw new Test262Error('#2: !(!true) === true');
     18 }
     19 
     20 //CHECK#3
     21 var x = true;
     22 if (!x !== false) {
     23  throw new Test262Error('#3: var x = true; !x === false');
     24 }
     25 
     26 //CHECK#4
     27 var x = true;
     28 if (!(!x) !== true) {
     29  throw new Test262Error('#4: var x = true; !(!x) === true');
     30 }
     31 
     32 //CHECK#5
     33 var object = new Object();
     34 object.prop = true;
     35 if (!object.prop !== false) {
     36  throw new Test262Error('#5: var object = new Object(); object.prop = true; !object.prop === false');
     37 }
     38 
     39 reportCompare(0, 0);