keith_miller@apple.com | bcc77f2 | 2016-07-15 06:03:25 +0000 | [diff] [blame] | 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 | If ToUint32(P) is less than the value of |
| 7 | the length property of A, then return |
| 8 | es5id: 15.4.5.1_A2.2_T1 |
| 9 | description: length === 100, P in [0, 98, 99] |
| 10 | ---*/ |
| 11 | |
| 12 | //CHECK#1 |
| 13 | var x = Array(100); |
| 14 | x[0] = 1; |
| 15 | if (x.length !== 100) { |
| 16 | $ERROR('#1: x = Array(100); x[0] = 1; x.length === 100. Actual: ' + (x.length)); |
| 17 | } |
| 18 | |
| 19 | //CHECK#2 |
| 20 | x[98] = 1; |
| 21 | if (x.length !== 100) { |
| 22 | $ERROR('#2: x = Array(100); x[0] = 1; x[98] = 1; x.length === 100. Actual: ' + (x.length)); |
| 23 | } |
| 24 | |
| 25 | //CHECK#3 |
| 26 | x[99] = 1; |
| 27 | if (x.length !== 100) { |
| 28 | $ERROR('#3: x = Array(100); x[0] = 1; x[98] = 1; x[99] = 1; x.length === 100. Actual: ' + (x.length)); |
| 29 | } |