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