Debian Codegraph @

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