js/src/tests/test262/ch13/13.2/S13.2.2_A18_T1.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  * 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_T1.js
     8  * @description Object is declared with "var __obj={callee:"a"}"
     9  */
    11 var callee=0, b;
    13 var __obj={callee:"a"};
    15 result=(function(){
    16     with (arguments){
    17         callee=1;
    18         b=true;
    19     }
    20     return arguments;
    21 })(__obj);
    23 //////////////////////////////////////////////////////////////////////////////
    24 //CHECK#1
    25 if (callee !== 0) {
    26 	$ERROR('#1: callee === 0. Actual: callee ==='+callee);
    27 }
    28 //
    29 //////////////////////////////////////////////////////////////////////////////
    31 //////////////////////////////////////////////////////////////////////////////
    32 //CHECK#2
    33 if (__obj.callee !== "a") {
    34 	$ERROR('#2: __obj.callee === "a". Actual: __obj.callee==='+__obj.callee);
    35 }
    36 //
    37 //////////////////////////////////////////////////////////////////////////////
    39 //////////////////////////////////////////////////////////////////////////////
    40 //CHECK#3
    41 if (result.callee !== 1) {
    42 	$ERROR('#3: result.callee === 1. Actual: result.callee ==='+result.callee);
    43 }
    44 //
    45 //////////////////////////////////////////////////////////////////////////////
    47 //////////////////////////////////////////////////////////////////////////////
    48 //CHECK#4
    49 if (!(this.b)) {
    50 	$ERROR('#4: this.b === true. Actual: this.b ==='+this.b);
    51 }
    52 //
    53 //////////////////////////////////////////////////////////////////////////////

mercurial