15.2.3.7-6-a-266.js (827B)
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 26 verifyProperty(arr, "property", { 27 value: 12, 28 writable: true, 29 enumerable: true, 30 configurable: true, 31 }); 32 33 if (arr.length !== 0) { 34 throw new Test262Error('Expected arr.length === 0, actually ' + arr.length); 35 } 36 37 reportCompare(0, 0);