Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: test/mjsunit/es6/collections.js

Issue 451033003: WeakMap/WeakSet: Add test for non object keys (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+})();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698