js/src/tests/test262/ch11/11.4/11.4.1/S11.4.1_A3.2.js

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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  * If the property doesn't have the DontDelete attribute, return true
     6  *
     7  * @path ch11/11.4/11.4.1/S11.4.1_A3.2.js
     8  * @description Checking declared variable
     9  */
    11 //CHECK#1
    12 x = 1;
    13 if (delete x !== true) {
    14   $ERROR('#1: x = 1; delete x === true');
    15 }
    17 //CHECK#2
    18 function MyFunction(){};
    19 MyFunction.prop = 1;
    20 if (delete MyFunction.prop !== true) {
    21   $ERROR('#2: function MyFunction(){}; MyFunction.prop = 1; delete MyFunction.prop === true');
    22 }
    24 //CHECK#3
    25 function MyFunction(){};
    26 var MyObject = new MyFunction();
    27 MyObject.prop = 1;
    28 if (delete MyObject.prop !== true) {
    29   $ERROR('#3: function MyFunction(){}; var MyObject = new MyFunction(); MyFunction.prop = 1; delete MyObject.prop === true');
    30 }

mercurial