blob: 143fb6bab2f59433a8b11bc65038d44706145c86 [file] [log] [blame]
let array = new Float32Array(10);
function test(array, indicies, result) {
for (let i of indicies) {
if (array.hasOwnProperty(i) !== result)
throw new Error("wrong value for " + i);
if (array.hasOwnProperty(i.toString()) !== result)
throw new Error("wrong value for " + i + " (as String)");
}
}
noInline(test);
let interestingIndicies = [0, 1, 2, 8, 9];
for (let i = 0; i < 10000; i++)
test(array, interestingIndicies, true);
interestingIndicies = [-1, 10, 100];
for (let i = 0; i < 10000; i++)
test(array, interestingIndicies, false);