Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/defineProperty/15.2.3.6-4-279.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-279
6 description: >
7 Object.defineProperty - 'O' is an Array, 'name' is generic own
8 accessor property of 'O', and 'desc' is accessor descriptor, test
9 updating multiple attribute values of 'name' (15.4.5.1 step 5)
10 includes: [propertyHelper.js]
11 ---*/
12
13
14 var arrObj = [];
15
16 function getFunc() {
17 return 12;
18 }
19
20 function setFunc(value) {
21 arrObj.setVerifyHelpProp = value;
22 }
23 Object.defineProperty(arrObj, "property", {
24 get: function() {
25 return 24;
26 },
27 enumerable: true,
28 configurable: true
29 });
30 Object.defineProperty(arrObj, "property", {
31 get: getFunc,
32 set: setFunc,
33 enumerable: false,
34 configurable: false
35 });
36
37 verifyEqualTo(arrObj, "property", getFunc());
38
39 verifyWritable(arrObj, "property", "setVerifyHelpProp");
40
41 verifyNotEnumerable(arrObj, "property");
42
43 verifyNotConfigurable(arrObj, "property");