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: * Any variable that has not been assigned a value has the value undefined michael@0: * michael@0: * @path ch08/8.1/S8.1_A2_T1.js michael@0: * @description Check that var x have value and type undefined michael@0: */ michael@0: michael@0: var x; michael@0: michael@0: /////////////////////////////////////////////////////////////////// michael@0: // CHECK#1 michael@0: if (!(x === undefined)) { michael@0: $ERROR('#1: var x; x === undefined. Actual: ' + (x)); michael@0: } michael@0: // michael@0: /////////////////////////////////////////////////////////////////// michael@0: michael@0: /////////////////////////////////////////////////////////////////// michael@0: // CHECK#2 michael@0: if (!(typeof(x) === "undefined")) { michael@0: $ERROR('#2: var x; typeof(x) === "undefined". Actual: ' + (typeof(x))); michael@0: } michael@0: // michael@0: /////////////////////////////////////////////////////////////////// michael@0: michael@0: /////////////////////////////////////////////////////////////////// michael@0: // CHECK#3 michael@0: if (!(x === void 0)) { michael@0: $ERROR('#3: var x; x === void 0. Actual: ' + (x)); michael@0: } michael@0: // michael@0: /////////////////////////////////////////////////////////////////// michael@0: