Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/defineProperty/15.2.3.6-4-207.js

raw
1 // Copyright (c) 2012 Ecma International. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 es5id: 15.2.3.6-4-207
6 description: >
7 Object.defineProperty - 'O' is an Array, 'name' is an array index
8 named property, 'name' property doesn't exist in 'O' and
9 [[Enumerable]] is absent in accessor descriptor 'desc', test
10 [[Enumerable]] attribute of property 'name' is set to false
11 (15.4.5.1 step 4.c)
12 includes: [propertyHelper.js]
13 ---*/
14
15 var arrObj = [];
16
17 var setFunc = function(value) {
18 arrObj.setVerifyHelpProp = value;
19 };
20 var getFunc = function() {};
21
22 Object.defineProperty(arrObj, "0", {
23 set: setFunc,
24 get: getFunc,
25 configurable: true
26 });
27 verifyEqualTo(arrObj, "0", getFunc());
28
29 verifyWritable(arrObj, "0", "setVerifyHelpProp");
30
31 verifyNotEnumerable(arrObj, "0");
32
33 verifyConfigurable(arrObj, "0");