blob: 93816dc3672635cd58c8502478592d6c094436ba [file] [log] [blame]
function test() {
var key1 = {};
var key2 = {};
var weakmap = new WeakMap([[key1, 123], [key2, 456]]);
return weakmap.has(key1) && weakmap.get(key1) === 123 &&
weakmap.has(key2) && weakmap.get(key2) === 456;
}
if (!test())
throw new Error("Test failed");