S15.3.2.1_A2_T3.js (743B)
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_T3 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(1, 1, "ABBA"), "2ABBA", 'f(1, 1, ABBA) must return "2ABBA"'); 22 23 reportCompare(0, 0);