S13_A4_T3.js (1141B)
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_T3 10 description: > 11 Declaring a function that uses arithmetical operators within its 12 "return" Expression 13 ---*/ 14 15 function __func(arg1, arg2, arg3){return arg1+=(arg2+=arg3);}; 16 17 ////////////////////////////////////////////////////////////////////////////// 18 //CHECK#1 19 if (typeof __func !== "function") { 20 throw new Test262Error('#1: typeof __func === "function". Actual: typeof __func ==='+typeof __func); 21 } 22 // 23 ////////////////////////////////////////////////////////////////////////////// 24 25 ////////////////////////////////////////////////////////////////////////////// 26 //CHECK#2 27 if (__func(10, 20, 30) !== 60) { 28 throw new Test262Error('#2: __func(10, 20, 30) === 60. Actual: __func(10,20,30) ==='+__func(10,20,30)); 29 } 30 // 31 ////////////////////////////////////////////////////////////////////////////// 32 33 reportCompare(0, 0);