S13_A2_T3.js (992B)
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: function must be evaluated inside the expression 6 es5id: 13_A2_T3 7 description: > 8 Defining function body with "return arguments[0] +"-"+ 9 arguments[1]" 10 ---*/ 11 12 var x = (function __func(){return arguments[0] +"-"+ arguments[1]})("Obi","Wan"); 13 14 ////////////////////////////////////////////////////////////////////////////// 15 //CHECK#1 16 if (x !== "Obi-Wan") { 17 throw new Test262Error('#1: x === "Obi-Wan". Actual: x ==='+x); 18 } 19 20 // 21 ////////////////////////////////////////////////////////////////////////////// 22 23 ////////////////////////////////////////////////////////////////////////////// 24 //CHECK#2 25 if (typeof __func !== 'undefined') { 26 throw new Test262Error('#2: typeof __func === \'undefined\'. Actual: typeof __func ==='+typeof __func); 27 } 28 // 29 ////////////////////////////////////////////////////////////////////////////// 30 31 reportCompare(0, 0);