Index: test/mjsunit/harmony/collections.js |
diff --git a/test/mjsunit/harmony/collections.js b/test/mjsunit/harmony/collections.js |
index 6698a334882f53ae80653b6491cbd2e3f521a313..0219f39364d97a6859037a3f48de87dcefcd8ae3 100644 |
--- a/test/mjsunit/harmony/collections.js |
+++ b/test/mjsunit/harmony/collections.js |
@@ -355,3 +355,18 @@ for (var i = 9; i >= 0; i--) { |
m.delete(i); |
assertEquals(i, m.size); |
} |
+ |
+// Test clear |
+var a = new Set(); |
+s.add(42); |
+assertTrue(s.has(42)); |
+s.clear(); |
+assertFalse(s.has(42)); |
+assertEquals(0, s.size); |
+ |
+var m = new Map(); |
+m.set(42, true); |
+assertTrue(m.has(42)); |
+m.clear(); |
+assertFalse(m.has(42)); |
+assertEquals(0, m.size); |