Debian Codegraph @

js/src/tests/test262/built-ins/Function/length/S15.3.5.1_A2_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 does not have the attributes { DontDelete }
6 es5id: 15.3.5.1_A2_T1
7 description: >
8 Checking if deleting the length property of
9 Function("arg1,arg2,arg3", null) succeeds
10 ---*/
11
12 var f = new Function("arg1,arg2,arg3", null);
13
14 assert(f.hasOwnProperty('length'), 'f.hasOwnProperty(\'length\') must return true');
15 assert(delete f.length, 'The value of delete f.length is expected to be true');
16 assert(!f.hasOwnProperty('length'), 'The value of !f.hasOwnProperty(\'length\') is expected to be true');
17 assert.notSameValue(f.length, 3, 'The value of f.length is not 3');
18
19 // TODO: Convert to verifyProperty() format.
20
21 reportCompare(0, 0);