Debian Codegraph @

js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-292-2-strict.js

raw
1 'use strict';
2 // Copyright (c) 2012 Ecma International. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4
5 /*---
6 es5id: 15.2.3.6-4-292-1
7 description: >
8 Object.defineProperty - 'O' is an Arguments object of a function
9 that has formal parameters, 'name' is own property of 'O' which is
10 also defined in [[ParameterMap]] of 'O', and 'desc' is data
11 descriptor, test updating multiple attribute values of 'name'
12 (10.6 [[DefineOwnProperty]] step 3 and 5.b)
13 includes: [propertyHelper.js]
14 flags: [onlyStrict]
15 ---*/
16
17 (function(a, b, c) {
18 Object.defineProperty(arguments, "0", {
19 value: 20,
20 writable: false,
21 enumerable: false,
22 configurable: false
23 });
24
25 if (a !== 0) {
26 throw new Test262Error('Expected a === 0, actually ' + a);
27 }
28
29 verifyProperty(arguments, "0", {
30 value: 20,
31 writable: false,
32 enumerable: false,
33 configurable: false,
34 });
35 }(0, 1, 2));
36
37 reportCompare(0, 0);