js/src/tests/test262/ch12/12.5/S12.5_A3.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  * When the production "IfStatement: if ( Expression ) Statement else Statement" is evaluated, Expression is evaluated first
     6  *
     7  * @path ch12/12.5/S12.5_A3.js
     8  * @description The Expression is "(function(){throw 1})()"
     9  */
    11 //////////////////////////////////////////////////////////////////////////////
    12 //CHECK#1
    13 try {
    14 	if ((function(){throw 1})()) abracadabra
    15 } catch (e) {
    16 	if (e !== 1) {
    17 		$ERROR('#1: Exception === 1. Actual:  Exception ==='+ e);
    18 	}
    19 }
    20 //
    21 //////////////////////////////////////////////////////////////////////////////
    23 //////////////////////////////////////////////////////////////////////////////
    24 //CHECK#2
    25 try {
    26 	if ((function(){throw 1})()) abracadabra; else blablachat;
    27 } catch (e) {
    28 	if (e !== 1) {
    29 		$ERROR('#2: Exception === 1. Actual:  Exception ==='+ e);
    30 	}
    31 }
    32 //
    33 //////////////////////////////////////////////////////////////////////////////

mercurial