blob: 043dcf8d693c60240debaffb2ddc8d670e947c39 [file] [log] [blame]
function shouldBe(actual, expected)
{
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
function test()
{
var map = new Map();
map.set(42, 42);
var res1 = map.get(42);
map.set(42, 100);
var res2 = map.get(42);
return res1 + res2;
}
for (var i = 0; i < 1e6; ++i)
shouldBe(test(), 142);