js/src/tests/test262/ch12/12.2/S12.2_A2.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  * Variables are defined with global scope (that is, they are created as members of the global object, as described in 10.1.3) using property attributes { DontDelete}
     6  *
     7  * @path ch12/12.2/S12.2_A2.js
     8  * @description Checking if deleting global variables that have the attributes {DontDelete} fails
     9  */
    11 //////////////////////////////////////////////////////////////////////////////
    12 //CHECK#1
    13 if (delete(__variable)) {
    14 	$ERROR('#1: delete(__variable)===false');
    15 }
    16 //
    17 //////////////////////////////////////////////////////////////////////////////
    19 //////////////////////////////////////////////////////////////////////////////
    20 //CHECK#2
    21 if (delete(this["__variable"])) {
    22 	$ERROR('#2: delete(this["__variable"])===false');
    23 }
    24 //
    25 //////////////////////////////////////////////////////////////////////////////
    28 var __variable;
    29 var __variable = "defined";
    31 //////////////////////////////////////////////////////////////////////////////
    32 //CHECK#3
    33 if (delete(__variable) | delete(this["__variable"])) {
    34 	$ERROR('#3: (delete(__variable) | delete(this["__variable"]))===false' );
    35 }
    36 //
    37 //////////////////////////////////////////////////////////////////////////////
    39 //////////////////////////////////////////////////////////////////////////////
    40 //CHECK#4
    41 if ((__variable !== "defined")|(this["__variable"] !=="defined")) {
    42 	$ERROR('#4: __variable === "defined" and this["__variable"] ==="defined"');
    43 }
    44 //
    45 //////////////////////////////////////////////////////////////////////////////

mercurial