|
1 // Copyright 2009 the Sputnik authors. All rights reserved. |
|
2 // This code is governed by the BSD license found in the LICENSE file. |
|
3 |
|
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 */ |
|
10 |
|
11 //CHECK#1 |
|
12 x = 1; |
|
13 if (delete x !== true) { |
|
14 $ERROR('#1: x = 1; delete x === true'); |
|
15 } |
|
16 |
|
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 } |
|
23 |
|
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 } |
|
31 |