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