blob: a46fd127d1c3f6c1f80159a02aae7614a6959cd5 [file] [log] [blame]
description("Tests array.splice behavior for contiguous storage with no holes.");
var a = new Array(10);
for (var i = 0; i < a.length; ++i) {
a[i] = i;
}
var startIndex = 3;
a.splice(startIndex, 1);
for (var i = 0; i < startIndex; ++i) {
shouldBe("a[" + i + "]", "" + i);
}
for (var i = startIndex; i < a.length; ++i) {
shouldBe("a[" + i + "]", "" + (i + 1));
}