S15.3.5.1_A1_T2.js (648B)
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 value of the length property is usually an integer that indicates the 7 'typical' number of arguments expected by the function 8 es5id: 15.3.5.1_A1_T2 9 description: > 10 Checking length property of Function("arg1,arg2,arg3","arg4,arg5", 11 null) 12 ---*/ 13 14 var f = Function("arg1,arg2,arg3", "arg4,arg5", null); 15 16 assert(f.hasOwnProperty('length'), 'f.hasOwnProperty(\'length\') must return true'); 17 assert.sameValue(f.length, 5, 'The value of f.length is expected to be 5'); 18 19 reportCompare(0, 0);