Backed out 3 changesets (bug 1892041) for causing failures on async-module-does-not...
[gecko.git] / js / src / tests / test262 / built-ins / Object / defineProperties / 15.2.3.7-6-a-197.js
blobc95e92a883bc4398eb46ad2c7e8a1867f4df48a7
1 // Copyright (c) 2012 Ecma International.  All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 es5id: 15.2.3.7-6-a-197
6 description: >
7     Object.defineProperties - 'O' is an Array, 'P' is an array index
8     named property, 'P' property doesn't exist in 'O', test
9     [[Writable]] of 'P' property in 'Attributes' is set as false value
10     if [[Writable]] is absent in data descriptor 'desc'  (15.4.5.1
11     step 4.c)
12 includes: [propertyHelper.js]
13 ---*/
15 var arr = [];
16 var isOwnProperty = false;
17 var canWritable = false;
19 Object.defineProperties(arr, {
20   "0": {
21     value: 1001,
22     enumerable: true,
23     configurable: false
24   }
25 });
27 assert(arr.hasOwnProperty("0"));
28 verifyNotWritable(arr, "0");
29 assert.sameValue(arr[0], 1001);
31 reportCompare(0, 0);