js/src/tests/test262/ch13/13.2/S13.2.2_A18_T2.js

Wed, 31 Dec 2014 07:53:36 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:53:36 +0100
branch
TOR_BUG_3246
changeset 5
4ab42b5ab56c
permissions
-rw-r--r--

Correct small whitespace inconsistency, lost while renaming variables.

     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  * Using arguments object within a "with" Expression that is nested in a function is admitted
     6  *
     7  * @path ch13/13.2/S13.2.2_A18_T2.js
     8  * @description Object is declared with "__obj={callee:"a"}"
     9  */
    11 this.callee = 0;
    12 var b;
    14 __obj={callee:"a"};
    16 function f(){
    17     with (arguments){
    18         callee=1;
    19         b=true;
    20         return arguments;
    21     }
    22 };
    24 result=f(__obj);
    26 //////////////////////////////////////////////////////////////////////////////
    27 //CHECK#1
    28 if (callee !== 0) {
    29 	$ERROR('#1: callee === 0. Actual: callee ==='+callee);
    30 }
    31 //
    32 //////////////////////////////////////////////////////////////////////////////
    34 //////////////////////////////////////////////////////////////////////////////
    35 //CHECK#2
    36 if (__obj.callee !== "a") {
    37 	$ERROR('#2: __obj.callee === "a". Actual: __obj.callee ==='+__obj.callee);
    38 }
    39 //
    40 //////////////////////////////////////////////////////////////////////////////
    42 //////////////////////////////////////////////////////////////////////////////
    43 //CHECK#3
    44 if (result.callee !== 1) {
    45 	$ERROR('#3: result.callee === 1. Actual: result.callee ==='+result.callee);
    46 }
    47 //
    48 //////////////////////////////////////////////////////////////////////////////
    50 //////////////////////////////////////////////////////////////////////////////
    51 //CHECK#4
    52 if (!(this.b)) {
    53 	$ERROR('#4: this.b === true. Actual: this.b ==='+this.b);
    54 }
    55 //
    56 //////////////////////////////////////////////////////////////////////////////

mercurial