michael@0: // Copyright 2009 the Sputnik authors. All rights reserved. michael@0: // This code is governed by the BSD license found in the LICENSE file. michael@0: michael@0: /** michael@0: * "This" operator doesn't use GetValue. The operators "delete" and "typeof" can be applied to parenthesised expressions michael@0: * michael@0: * @path ch11/11.1/11.1.6/S11.1.6_A2.js michael@0: * @description Applying "delete" and "typeof" operators to an undefined variable and a property of an object michael@0: */ michael@0: michael@0: //CHECK#1 michael@0: if (delete (x) !== true) { michael@0: $ERROR('#1: delete (x) === true'); michael@0: } michael@0: michael@0: //CHECK#2 michael@0: if (typeof (x) !== "undefined") { michael@0: $ERROR('#2: typeof (x) === "undefined". Actual: ' + (typeof (x))); michael@0: } michael@0: michael@0: var object = {}; michael@0: //CHECK#3 michael@0: if (delete (object.prop) !== true) { michael@0: $ERROR('#3: var object = {}; delete (object.prop) === true'); michael@0: } michael@0: michael@0: //CHECK#4 michael@0: if (typeof (object.prop) !== "undefined") { michael@0: $ERROR('#4: var object = {}; typeof (object.prop) === "undefined". Actual: ' + (typeof (object.prop))); michael@0: } michael@0: