Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/defineProperties/15.2.3.7-6-a-303.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.7-6-a-303
6 description: >
7 Object.defineProperties - 'O' is an Arguments object, 'P' is
8 generic property, and 'desc' is accessor descriptor, test 'P' is
9 defined in 'O' with all correct attribute values (10.6
10 [[DefineOwnProperty]] step 4)
11 includes: [propertyHelper.js]
12 ---*/
13
14 var arg = (function() {
15 return arguments;
16 }(1, 2, 3));
17
18 function getFun() {
19 return "getFunctionString";
20 }
21
22 function setFun(value) {
23 arg.testGetFunction = value;
24 }
25 Object.defineProperties(arg, {
26 "genericProperty": {
27 get: getFun,
28 set: setFun,
29 enumerable: true,
30 configurable: true
31 }
32 });
33
34 verifyEqualTo(arg, "genericProperty", getFun());
35
36 verifyWritable(arg, "genericProperty", "testGetFunction");
37
38 verifyEnumerable(arg, "genericProperty");
39
40 verifyConfigurable(arg, "genericProperty");