tor-browser

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

S11.8.6_A6_T2.js (594B)


      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    Only Function objects implement [[HasInstance]] and can be proper
      7    ShiftExpression for the "instanceof" operator consequently
      8 es5id: 11.8.6_A6_T2
      9 description: Checking Math case
     10 ---*/
     11 
     12 //CHECK#1
     13 try{
     14 1 instanceof Math;
     15 throw new Test262Error('#1: 1 instanceof Math throw TypeError');
     16 }
     17 catch(e){
     18  if (e  instanceof TypeError !== true) { 
     19    throw new Test262Error('#1: 1 instanceof Math throw TypeError');
     20  }  
     21 }
     22 
     23 reportCompare(0, 0);