keith_miller@apple.com | bcc77f2 | 2016-07-15 06:03:25 +0000 | [diff] [blame] | 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 initial value of undefined is undefined |
| 6 | es5id: 15.1.1.3_A1 |
| 7 | description: Use typeof, isNaN, isFinite |
| 8 | ---*/ |
| 9 | |
| 10 | // CHECK#1 |
| 11 | if (typeof(undefined) !== "undefined") { |
| 12 | $ERROR('#1: typeof(undefined) === "undefined". Actual: ' + (typeof(undefined))); |
| 13 | } |
| 14 | |
| 15 | // CHECK#2 |
| 16 | if (undefined !== void 0) { |
| 17 | $ERROR('#2: undefined === void 0. Actual: ' + (undefined)); |
| 18 | } |
| 19 | |
| 20 | // CHECK#3 |
| 21 | if (undefined !== eval("var x")) { |
| 22 | $ERROR('#3: undefined === eval("var x"). Actual: ' + (undefined)); |
| 23 | } |