Lines Matching refs:array
31 var array = new Array(10);
32 assertEquals(13, array.unshift('1st', '2ns', '3rd'));
33 assertTrue(0 in array);
34 assertTrue(1 in array);
35 assertTrue(2 in array);
36 assertFalse(3 in array);
45 var array = new Array(len);
54 assertFalse(array.hasOwnProperty(0));
55 assertFalse(array.hasOwnProperty(1));
56 assertFalse(array.hasOwnProperty(2));
59 assertEquals(array[0], at0);
60 assertEquals(array[1], undefined);
61 assertEquals(array[2], at2);
63 assertEquals(len, array.unshift());
69 assertTrue(array.hasOwnProperty(0));
70 assertFalse(array.hasOwnProperty(1));
71 assertTrue(array.hasOwnProperty(2));
74 assertEquals(array[0], at0);
75 assertEquals(array[1], undefined);
76 assertEquals(array[2], at2);
83 var array = new Array(len);
87 assertEquals(len, array.length);
88 for (var i = 0; i < array.length; i++) {
89 assertEquals(array[i], Array.prototype[i]);
92 assertEquals(len + 1, array.unshift('head'));
94 assertEquals(len + 1, array.length);
96 assertEquals(array[4], Array.prototype[3]);
97 assertTrue(array.hasOwnProperty(4));
99 assertEquals(array[8], Array.prototype[7]);
100 assertTrue(array.hasOwnProperty(8));
104 assertEquals(array[5], Array.prototype[5]);
105 assertFalse(array.hasOwnProperty(5));
107 assertEquals(array[3], Array.prototype[3]);
108 assertFalse(array.hasOwnProperty(3));
110 assertEquals(array[7], Array.prototype[7]);
111 assertFalse(array.hasOwnProperty(7));
123 var array = new Array(len);
131 array.__proto__ = array_proto;
134 assertFalse(array.hasOwnProperty(0));
135 assertFalse(array.hasOwnProperty(1));
136 assertFalse(array.hasOwnProperty(2));
139 assertEquals(array[0], at0);
140 assertEquals(array[1], undefined);
141 assertEquals(array[2], at2);
143 assertEquals(len, array.unshift());
146 assertTrue(array.hasOwnProperty(0));
147 assertFalse(array.hasOwnProperty(1));
148 assertTrue(array.hasOwnProperty(2));
151 assertEquals(array[0], at0);
152 assertEquals(array[1], undefined);
153 assertEquals(array[2], at2);
160 var array = new Array(len);
164 array.__proto__ = array_proto;
166 assertEquals(len, array.length);
167 for (var i = 0; i < array.length; i++) {
168 assertEquals(array[i], array_proto[i]);
171 assertEquals(len + 1, array.unshift('head'));
173 assertEquals(len + 1, array.length);
175 assertEquals(array[4], array_proto[3]);
176 assertTrue(array.hasOwnProperty(4));
178 assertEquals(array[8], array_proto[7]);
179 assertTrue(array.hasOwnProperty(8));
183 assertEquals(array[5], array_proto[5]);
184 assertFalse(array.hasOwnProperty(5));
186 assertEquals(array[3], array_proto[3]);
187 assertFalse(array.hasOwnProperty(3));
189 assertEquals(array[7], array_proto[7]);
190 assertFalse(array.hasOwnProperty(7));