js/src/tests/test262/ch11/11.1/11.1.6/S11.1.6_A2.js

branch
TOR_BUG_3246
changeset 6
8bccb770b82d
equal deleted inserted replaced
-1:000000000000 0:0d1478e07cc4
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 * "This" operator doesn't use GetValue. The operators "delete" and "typeof" can be applied to parenthesised expressions
6 *
7 * @path ch11/11.1/11.1.6/S11.1.6_A2.js
8 * @description Applying "delete" and "typeof" operators to an undefined variable and a property of an object
9 */
10
11 //CHECK#1
12 if (delete (x) !== true) {
13 $ERROR('#1: delete (x) === true');
14 }
15
16 //CHECK#2
17 if (typeof (x) !== "undefined") {
18 $ERROR('#2: typeof (x) === "undefined". Actual: ' + (typeof (x)));
19 }
20
21 var object = {};
22 //CHECK#3
23 if (delete (object.prop) !== true) {
24 $ERROR('#3: var object = {}; delete (object.prop) === true');
25 }
26
27 //CHECK#4
28 if (typeof (object.prop) !== "undefined") {
29 $ERROR('#4: var object = {}; typeof (object.prop) === "undefined". Actual: ' + (typeof (object.prop)));
30 }
31

mercurial