S15.3.2.1_A2_T2.js (747B)
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 It is permissible but not necessary to have one argument for each formal 7 parameter to be specified 8 es5id: 15.3.2.1_A2_T2 9 description: > 10 Values of the function constructor arguments are "arg1, arg2", 11 "arg3", "return arg1+arg2+arg3;" 12 ---*/ 13 14 try { 15 var f = Function("arg1, arg2", "arg3", "return arg1+arg2+arg3;"); 16 } catch (e) { 17 throw new Test262Error('#1: test failed'); 18 } 19 20 assert(f instanceof Function, 'The result of evaluating (f instanceof Function) is expected to be true'); 21 assert.sameValue(f("AB", "BA", 1), "ABBA1", 'f(AB, BA, 1) must return "ABBA1"'); 22 23 reportCompare(0, 0);