Debian Codegraph @

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