js/src/jit-test/tests/basic/splice-huge-array-finishes.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/basic/splice-huge-array-finishes.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,15 @@
     1.4 +// Making the array huge and sparse shouldn't leave us iterating through the entire array.
     1.5 +// But it does, sadly. Disable, because it takes too long.
     1.6 +if (0) {
     1.7 +    var arr = [1, 2, 3, 4, 5, 6, 7, 8];
     1.8 +    arr.length = Math.pow(2, 32) - 2;
     1.9 +    arr.splice(5); // also test overflow
    1.10 +
    1.11 +    assertEq(arr.length, 5);
    1.12 +    assertEq(arr[0], 1);
    1.13 +    assertEq(arr[1], 2);
    1.14 +    assertEq(arr[2], 3);
    1.15 +    assertEq(arr[3], 4);
    1.16 +    assertEq(arr[4], 5);
    1.17 +    assertEq(arr[5], undefined);
    1.18 +}

mercurial