| 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-266 |
| 6 |
description: > |
| 7 |
Object.defineProperties - 'O' is an Array, 'P' is generic property |
| 8 |
that won't exist on 'O', and 'desc' is data descriptor, test 'P' |
| 9 |
is defined in 'O' with all correct attribute values (15.4.5.1 step |
| 10 |
5) |
| 11 |
includes: [propertyHelper.js] |
| 12 |
---*/ |
| 13 |
|
| 14 |
|
| 15 |
var arr = []; |
| 16 |
|
| 17 |
Object.defineProperties(arr, { |
| 18 |
"property": { |
| 19 |
value: 12, |
| 20 |
writable: true, |
| 21 |
enumerable: true, |
| 22 |
configurable: true |
| 23 |
} |
| 24 |
}); |
| 25 |
verifyEqualTo(arr, "property", 12); |
| 26 |
|
| 27 |
verifyWritable(arr, "property"); |
| 28 |
|
| 29 |
verifyEnumerable(arr, "property"); |
| 30 |
|
| 31 |
verifyConfigurable(arr, "property"); |
| 32 |
|
| 33 |
if (arr.length !== 0) { |
| 34 |
$ERROR('Expected arr.length === 0, actually ' + arr.length); |
| 35 |
} |