js/src/tests/test262/ch12/12.14/S12.14_A18_T3.js

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     1 // Copyright 2009 the Sputnik authors.  All rights reserved.
     2 // This code is governed by the BSD license found in the LICENSE file.
     4 /**
     5  * Catching objects with try/catch/finally statement
     6  *
     7  * @path ch12/12.14/S12.14_A18_T3.js
     8  * @description Catching boolean
     9  */
    11 // CHECK#1
    12 try{
    13   throw true;
    14 }
    15 catch(e){
    16   if (e!==true) $ERROR('#1: Exception ===true. Actual:  Exception ==='+ e  );
    17 }
    19 // CHECK#2
    20 try{
    21   throw false;
    22 }
    23 catch(e){
    24   if (e!==false) $ERROR('#2: Exception ===false. Actual:  Exception ==='+ e  );
    25 }
    27 // CHECK#3
    28 var b=false;
    29 try{
    30   throw b;
    31 }
    32 catch(e){
    33   if (e!==false) $ERROR('#3: Exception ===false. Actual:  Exception ==='+ e  );
    34 }
    36 // CHECK#4
    37 var b=true;
    38 try{
    39   throw b;
    40 }
    41 catch(e){
    42   if (e!==true) $ERROR('#4: Exception ===true. Actual:  Exception ==='+ e  );
    43 }
    45 // CHECK#5
    46 var b=true;
    47 try{
    48   throw b&&false;
    49 }
    50 catch(e){
    51   if (e!==false) $ERROR('#5: Exception ===false. Actual:  Exception ==='+ e  );
    52 }
    54 // CHECK#5
    55 var b=true;
    56 try{
    57   throw b||false;
    58 }
    59 catch(e){
    60   if (e!==true) $ERROR('#6: Exception ===true. Actual:  Exception ==='+ e  );
    61 }

mercurial