Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/defineProperty/15.2.3.6-4-292-1.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-292-1
6 description: >
7 Object.defineProperty - 'O' is an Arguments object of a function
8 that has formal parameters, 'name' is own property of 'O' which is
9 also defined in [[ParameterMap]] of 'O', and 'desc' is data
10 descriptor, test updating multiple attribute values of 'name'
11 (10.6 [[DefineOwnProperty]] step 3 and 5.b)
12 includes: [propertyHelper.js]
13 flags: [noStrict]
14 ---*/
15
16 (function(a, b, c) {
17 Object.defineProperty(arguments, "0", {
18 value: 20,
19 writable: false,
20 enumerable: false,
21 configurable: false
22 });
23
24 if (a !== 20) {
25 $ERROR('Expected a === 20, actually ' + a);
26 }
27
28 verifyEqualTo(arguments, "0", 20);
29
30 verifyNotWritable(arguments, "0");
31
32 verifyNotEnumerable(arguments, "0");
33
34 verifyNotConfigurable(arguments, "0");
35 }(0, 1, 2));