Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/void/S11.4.2_A2_T1.js

raw
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 $ERROR('#1: void 0 === undefined. Actual: ' + (void 0));
13 }
14
15 //CHECK#2
16 var x = 0;
17 if (void x !== undefined) {
18 $ERROR('#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 $ERROR('#3: var x = new Object(); void x === undefined. Actual: ' + (void x));
25 }