S15.4.5.1_A1.2_T2.js (669B)
1 // Copyright 2009 the Sputnik authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 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 ---*/ 13 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'); 17 18 x.length = 2; 19 assert.sameValue(x[2], -1, 'The value of x[2] is expected to be -1'); 20 21 reportCompare(0, 0);