js/src/tests/test262/ch12/12.10/S12.10_A5_T3.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  * Deleting property using "eval" statement containing "with" statement
     6  *
     7  * @path ch12/12.10/S12.10_A5_T3.js
     8  * @description Deleting boolean property
     9  * @noStrict
    10  */
    12 this.p1 = 'a';
    13 var myObj = {
    14   p1: true,
    15   del:false 
    16 }
    18 eval("with(myObj){del = delete p1}");
    20 //////////////////////////////////////////////////////////////////////////////
    21 //CHECK#1
    22 if(myObj.p1 === true){
    23   $ERROR('#1: myObj.p1 !== true ');
    24 }
    25 //
    26 //////////////////////////////////////////////////////////////////////////////
    28 //////////////////////////////////////////////////////////////////////////////
    29 //CHECK#2
    30 if(myObj.p1 !== undefined){
    31   $ERROR('#2: myObj.p1 === undefined . Actual:  myObj.p1 ==='+ myObj.p1  );
    32 }
    33 //
    34 //////////////////////////////////////////////////////////////////////////////
    36 //////////////////////////////////////////////////////////////////////////////
    37 //CHECK#3
    38 if(myObj.del !== true){
    39   $ERROR('#3: myObj.del === true . Actual:  myObj.del ==='+ myObj.del  );
    40 }
    41 //
    42 //////////////////////////////////////////////////////////////////////////////
    44 //////////////////////////////////////////////////////////////////////////////
    45 //CHECK#4
    46 if(myObj.p1 === 'a'){
    47   $ERROR('#4: myObj.p1 !== \'a\'');
    48 }
    49 //
    50 //////////////////////////////////////////////////////////////////////////////

mercurial