S11.4.2_A2_T1.js (708B)
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 info: Operator "void" uses GetValue 6 es5id: 11.4.2_A2_T1 7 description: Either Type(x) is not Reference or GetBase(x) is not null 8 ---*/ 9 10 //CHECK#1 11 if (void 0 !== undefined) { 12 throw new Test262Error('#1: void 0 === undefined. Actual: ' + (void 0)); 13 } 14 15 //CHECK#2 16 var x = 0; 17 if (void x !== undefined) { 18 throw new Test262Error('#2: var x = 0; void x === undefined. Actual: ' + (void x)); 19 } 20 21 //CHECK#3 22 var x = new Object(); 23 if (void x !== undefined) { 24 throw new Test262Error('#3: var x = new Object(); void x === undefined. Actual: ' + (void x)); 25 } 26 27 reportCompare(0, 0);