Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / Object / defineProperty / 15.2.3.6-4-266.js
blob7fd1bfcf7fa9e99b29c4c049e6bf6f0685894ca7
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.6-4-266
6 description: >
7     Object.defineProperty - 'O' is an Array, 'name' is an array index
8     named property, name is accessor property and 'desc' is accessor
9     descriptor, test setting the [[Get]] attribute value of 'name' as
10     undefined (15.4.5.1 step 4.c)
11 includes: [propertyHelper.js]
12 ---*/
15 var arrObj = [];
17 function getFunc() {
18   return 12;
21 Object.defineProperty(arrObj, "0", {
22   get: getFunc,
23   configurable: true
24 });
26 Object.defineProperty(arrObj, "0", {
27   get: undefined
28 });
30 verifyProperty(arrObj, "0", {
31   enumerable: false,
32   configurable: true,
33 });
35 reportCompare(0, 0);