S13_A4_T1.js (1064B)
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 The production FunctionDeclaration: "function Identifier ( 7 FormalParameterList_opt ) { FunctionBody }" is processed by function 8 declarations 9 es5id: 13_A4_T1 10 description: Declaring a function that returns string 11 ---*/ 12 13 function __func(){return "zig-zig-sputnik";}; 14 15 ////////////////////////////////////////////////////////////////////////////// 16 //CHECK#1 17 if (typeof __func !== "function") { 18 throw new Test262Error('#1: typeof __func === "function". Actual: typeof __func ==='+typeof __func); 19 } 20 // 21 ////////////////////////////////////////////////////////////////////////////// 22 23 ////////////////////////////////////////////////////////////////////////////// 24 //CHECK#2 25 if (__func() !== "zig-zig-sputnik") { 26 throw new Test262Error('#2: __func() === "zig-zig-sputnik". Actual: __func() ==='+__func()); 27 } 28 // 29 ////////////////////////////////////////////////////////////////////////////// 30 31 reportCompare(0, 0);