blob: dbe8303e94245b1b6f935c788214b28c2f6eeb0c [file] [log] [blame]
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
function test(map)
{
var iterator = map.values();
return iterator.next().value;
}
noInline(test);
var map = new Map([[1, 1], [2, 2], [3, 3]]);
for (var i = 0; i < 1e6; ++i)
shouldBe(test(map), 1);