| 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.7-6-a-206 |
| 6 |
description: > |
| 7 |
Object.defineProperties - 'O' is an Array, 'P' is an array index |
| 8 |
named property, 'P' makes no change if every field in 'desc' is |
| 9 |
absent (name is data property) (15.4.5.1 step 4.c) |
| 10 |
includes: [propertyHelper.js] |
| 11 |
---*/ |
| 12 |
|
| 13 |
var arr = []; |
| 14 |
|
| 15 |
arr[0] = 101; // default value of attributes: writable: true, configurable: true, enumerable: true |
| 16 |
|
| 17 |
|
| 18 |
Object.defineProperties(arr, { |
| 19 |
"0": {} |
| 20 |
}); |
| 21 |
verifyEqualTo(arr, "0", 101); |
| 22 |
|
| 23 |
verifyWritable(arr, "0"); |
| 24 |
|
| 25 |
verifyEnumerable(arr, "0"); |
| 26 |
|
| 27 |
verifyConfigurable(arr, "0"); |