Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/defineProperty/15.2.3.6-4-276.js

raw
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.6-4-276
6 description: >
7 Object.defineProperty - 'O' is an Array, 'name' is an array index
8 named property, test the length property of 'O' is set as
9 ToUint32('name') + 1 if ToUint32('name') is greater than value of
10 the length property in 'O' (15.4.5.1 step 4.e.ii)
11 ---*/
12
13 var arrObj = [];
14
15 Object.defineProperty(arrObj, "5", {
16 value: 3
17 });
18
19 assert.sameValue(arrObj.length, 6, 'arrObj.length');
20 assert.sameValue(arrObj[5], 3, 'arrObj[5]');