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