Debian Codegraph @

js/src/tests/test262/language/identifier-resolution/S11.1.2_A1_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: The result of evaluating an Identifier is always a value of type Reference
6 es5id: 11.1.2_A1_T1
7 description: Creating variables without defining it
8 ---*/
9
10 //CHECK#1
11 if (this.x !== undefined) {
12 throw new Test262Error('#1: this.x === undefined. Actual: ' + (this.x));
13 }
14
15 //CHECK#2
16 var object = new Object();
17 if (object.prop !== undefined) {
18 throw new Test262Error('#2: var object = new Object(); object.prop === undefined. Actual: ' + (object.prop));
19 }
20
21 //CHECK#3
22 this.y++;
23 if (isNaN(y) !== true) {
24 throw new Test262Error('#3: this.y++; y === Not-a-Number. Actual: ' + (y));
25 }
26
27 reportCompare(0, 0);