tor-browser

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

S12.13_A2_T3.js (905B)


      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    "throw Expression" returns (throw, GetValue(Result(1)), empty), where 1
      7    evaluates Expression
      8 es5id: 12.13_A2_T3
      9 description: Throwing boolean
     10 ---*/
     11 
     12 // CHECK#1
     13 try{
     14  throw true;
     15 }
     16 catch(e){
     17  if (e!==true) throw new Test262Error('#1: Exception ===true. Actual:  Exception ==='+ e  );
     18 }
     19 
     20 // CHECK#2
     21 try{
     22  throw false;
     23 }
     24 catch(e){
     25  if (e!==false) throw new Test262Error('#2: Exception ===false. Actual:  Exception ==='+ e  );
     26 }
     27 
     28 // CHECK#3
     29 var b=false;
     30 try{
     31  throw b;
     32 }
     33 catch(e){
     34  if (e!==false) throw new Test262Error('#3: Exception ===false. Actual:  Exception ==='+ e  );
     35 }
     36 
     37 // CHECK#4
     38 var b=true;
     39 try{
     40  throw b;
     41 }
     42 catch(e){
     43  if (e!==true) throw new Test262Error('#4: Exception ===true. Actual:  Exception ==='+ e  );
     44 }
     45 
     46 reportCompare(0, 0);