tor-browser

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

S11.2.3_A3_T5.js (808B)


      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: If MemberExpression is not Object, throw TypeError
      6 es5id: 11.2.3_A3_T5
      7 description: Checking "null" case
      8 ---*/
      9 
     10 //CHECK#1
     11 try {
     12  null();
     13    throw new Test262Error('#1.1: null() throw TypeError. Actual: ' + (null()));	
     14 }
     15 catch (e) {
     16  if ((e instanceof TypeError) !== true) {
     17    throw new Test262Error('#1.2: null() throw TypeError. Actual: ' + (e));	
     18  }
     19 }
     20 
     21 //CHECK#2
     22 try {
     23  var x = null;
     24  x();
     25    throw new Test262Error('#2.1: var x = null; x() throw TypeError. Actual: ' + (x()));	
     26 }
     27 catch (e) {
     28  if ((e instanceof TypeError) !== true) {
     29    throw new Test262Error('#2.2: var x = null; x() throw TypeError. Actual: ' + (e));	
     30  }
     31 }
     32 
     33 reportCompare(0, 0);