(length)
| 134 | |
| 135 | |
| 136 | function TestArrayLongerLength(length) { |
| 137 | var x = new Array(4); |
| 138 | x[0] = 42; |
| 139 | x[2] = 37; |
| 140 | x.length = length; |
| 141 | Array.prototype.sort.call(x); |
| 142 | assertEquals(length, x.length, "longlength length"); |
| 143 | assertEquals(37, x[0], "longlength first"); |
| 144 | assertEquals(42, x[1], "longlength second"); |
| 145 | assertFalse(2 in x,"longlength third"); |
| 146 | } |
| 147 | |
| 148 | TestArrayLongerLength(4); |
| 149 | TestArrayLongerLength(10); |
no test coverage detected
searching dependent graphs…