Debian Codegraph @

js/src/tests/test262/built-ins/Function/length/S15.3.5.1_A4_T1.js

raw
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_T1
7 description: >
8 Checking if enumerating the length property of
9 Function("arg1,arg2,arg3", null) fails
10 ---*/
11
12 var f = new Function("arg1,arg2,arg3", 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 assert(!lengthenumed, 'The value of !lengthenumed is expected to be true');
22
23 // TODO: Convert to verifyProperty() format.
24
25 reportCompare(0, 0);