|
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 * When the [[Call]] property for a Function object is called, |
|
6 * the body is evaluated and if evaluation result has type "normal", then "undefined" is returned |
|
7 * |
|
8 * @path ch13/13.2/S13.2.1_A9.1_T2.js |
|
9 * @description Declaring a function with "var __func = function()" and no "return" in the function body |
|
10 */ |
|
11 |
|
12 var x; |
|
13 |
|
14 var __func = function(){ |
|
15 x = true; |
|
16 } |
|
17 |
|
18 ////////////////////////////////////////////////////////////////////////////// |
|
19 //CHECK#1 |
|
20 if (__func() !== undefined) { |
|
21 $ERROR('#1: __func() === undefined. Actual: __func() ==='+__func()); |
|
22 }; |
|
23 // |
|
24 ////////////////////////////////////////////////////////////////////////////// |
|
25 |
|
26 ////////////////////////////////////////////////////////////////////////////// |
|
27 //CHECK#2 |
|
28 if (!x) { |
|
29 $ERROR('#2: x === true. Actual: x === '+x); |
|
30 } |
|
31 // |
|
32 ////////////////////////////////////////////////////////////////////////////// |
|
33 |