blob: f0d113f92d9c31458b54163e7788075b9b19a2a9 [file] [log] [blame]
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
function test(length, number)
{
return new Array(length / number);
}
noInline(test);
var value = 0;
var number = 0;
for (var i = 0; i < 1e4; ++i) {
value = i * 2;
number = 2;
if (i === (1e4 - 1)) {
value = 0;
number = -1;
}
shouldBe(test(value, number).length, (value / number));
}