WSL should have more tests of type checking failures
[WebKit-https.git] / JSTests / es6 / WeakMap_constructor_invokes_set.js
1 function test() {
2
3 var passed = false;
4 var _set = WeakMap.prototype.set;
5
6 WeakMap.prototype.set = function(k, v) {
7   passed = true;
8 };
9
10 new WeakMap([ [{ }, 42] ]);
11 WeakMap.prototype.set = _set;
12
13 return passed;
14       
15 }
16
17 if (!test())
18     throw new Error("Test failed");
19