js/src/tests/test262/ch08/8.1/S8.1_A2_T2.js

branch
TOR_BUG_3246
changeset 6
8bccb770b82d
equal deleted inserted replaced
-1:000000000000 0:a143badd2cfa
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 * Any variable that has not been assigned a value has the value undefined
6 *
7 * @path ch08/8.1/S8.1_A2_T2.js
8 * @description Function return undefined
9 */
10
11 // CHECK#1
12 function test1(x) {
13 return x;
14 }
15
16 if (!(test1() === void 0)) {
17 $ERROR('#1: function test1(x){return x} test1() === void 0. Actual: ' + (test1()));
18 }
19
20 // CHECK#2
21 function test2() {
22 }
23
24 if (!(test2() === void 0)) {
25 $ERROR('#2: function test2(){} test2() === void 0. Actual: ' + (test2()));
26 }
27

mercurial