js/src/tests/test262/ch12/12.2/S12.2_A5.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  * VariableDeclaration within Eval statement is initialized as the program reaches the eval statement
     6  *
     7  * @path ch12/12.2/S12.2_A5.js
     8  * @description Executing eval("var x")
     9  */
    11 //////////////////////////////////////////////////////////////////////////////
    12 //CHECK#1
    13 try{
    14 	x=x;
    15 	$ERROR('#1: "x=x" lead to throwing exception');
    16 }catch(e){
    17 	$PRINT(e.message);
    18 };
    19 //
    20 //////////////////////////////////////////////////////////////////////////////
    22 eval("var x");
    24 //////////////////////////////////////////////////////////////////////////////
    25 //CHECK#2
    26 try{
    27 	x=x;
    28 }catch(e){
    29 	$ERROR('#2: VariableDeclaration inside Eval statement is initialized when program reaches the eval statement '+e.message);
    30 };
    31 //
    32 //////////////////////////////////////////////////////////////////////////////

mercurial