Index: test/mjsunit/es6/collections.js |
diff --git a/test/mjsunit/es6/collections.js b/test/mjsunit/es6/collections.js |
index 1e2f232ee814fa002397175d816b3c7c9472561b..c58571950c9545861dfa9d99e8ac25ebde8913d4 100644 |
--- a/test/mjsunit/es6/collections.js |
+++ b/test/mjsunit/es6/collections.js |
@@ -1141,6 +1141,13 @@ TestSetConstructorNextNotAnObject(Set); |
TestSetConstructorNextNotAnObject(WeakSet); |
+(function TestWeakSetConstructorNonObjectKeys() { |
+ assertThrows(function() { |
+ new WeakSet([1]); |
+ }, TypeError); |
+})(); |
+ |
+ |
function TestMapConstructor(ctor) { |
var m = new ctor(null); |
assertSize(0, m); |
@@ -1286,3 +1293,10 @@ function TestMapConstructorIteratorNotObjectValues(ctor) { |
} |
TestMapConstructorIteratorNotObjectValues(Map); |
TestMapConstructorIteratorNotObjectValues(WeakMap); |
+ |
+ |
+(function TestWeakMapConstructorNonObjectKeys() { |
+ assertThrows(function() { |
+ new WeakMap([[1, 2]]) |
+ }, TypeError); |
+})(); |