S15.3.5.1_A4_T2.js (715B)
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: the length property has the attributes { DontEnum } 6 es5id: 15.3.5.1_A4_T2 7 description: > 8 Checking if enumerating the length property of 9 Function("arg1,arg2,arg3","arg4,arg5", null) fails 10 ---*/ 11 12 var f = Function("arg1,arg2,arg3", "arg5,arg4", null); 13 14 assert(f.hasOwnProperty('length'), 'f.hasOwnProperty(\'length\') must return true'); 15 16 for (var key in f) { 17 if (key == "length") { 18 var lengthenumed = true; 19 } 20 } 21 22 assert(!lengthenumed, 'The value of !lengthenumed is expected to be true'); 23 24 // TODO: Convert to verifyProperty() format. 25 26 reportCompare(0, 0);