Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / Array / S15.4.5.1_A1.2_T2.js
blobaa7add8256453f3c650b59ddb65765eefd39fecf
1 // Copyright 2009 the Sputnik authors.  All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 info: |
6     For every integer k that is less than the value of
7     the length property of A but not less than ToUint32(length),
8     if A itself has a property (not an inherited property) named ToString(k),
9     then delete that property
10 es5id: 15.4.5.1_A1.2_T2
11 description: Checking an inherited property
12 ---*/
14 Array.prototype[2] = -1;
15 var x = [0, 1, 2];
16 assert.sameValue(x[2], 2, 'The value of x[2] is expected to be 2');
18 x.length = 2;
19 assert.sameValue(x[2], -1, 'The value of x[2] is expected to be -1');
21 reportCompare(0, 0);