js/src/tests/test262/ch11/11.4/11.4.1/S11.4.1_A3.2.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  * 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