blob: a3a27d009ab00349f07596c3c4ab91efb424788f [file] [log] [blame]
description(
"Checks that sorting an array with a side-effecting comparison function doesn't trigger assertions."
);
var array = [];
for (var i = 0; i < 2000; ++i)
array.push(i);
array.sort(function(a, b) {
array.shift();
if (a < b)
return -1;
if (a > b)
return 1;
return 0;
});
testPassed("It worked.");