Debian Codegraph @

js/src/tests/test262/built-ins/Array/S15.4.5.1_A2.2_T1.js

raw
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 var x = Array(100);
13 x[0] = 1;
14 assert.sameValue(x.length, 100, 'The value of x.length is expected to be 100');
15
16 x[98] = 1;
17 assert.sameValue(x.length, 100, 'The value of x.length is expected to be 100');
18
19 x[99] = 1;
20 assert.sameValue(x.length, 100, 'The value of x.length is expected to be 100');
21
22 reportCompare(0, 0);