js/src/tests/test262/ch09/9.2/S9.2_A1_T2.js

branch
TOR_BUG_3246
changeset 6
8bccb770b82d
equal deleted inserted replaced
-1:000000000000 0:bd5e81295f15
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 * Result of boolean conversion from undefined value is false
6 *
7 * @path ch09/9.2/S9.2_A1_T2.js
8 * @description Undefined, void and others are converted to Boolean by implicit transformation
9 */
10
11 // CHECK#1
12 if (!(undefined) !== true) {
13 $ERROR('#1: !(undefined) === true. Actual: ' + (!(undefined)));
14 }
15
16 // CHECK#2
17 if (!(void 0) !== true) {
18 $ERROR('#2: !(undefined) === true. Actual: ' + (!(undefined)));
19 }
20
21 // CHECK#3
22 if (!(eval("var x")) !== true) {
23 $ERROR('#3: !(eval("var x")) === true. Actual: ' + (!(eval("var x"))));
24 }
25

mercurial