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

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

Issue 739303002: Remove Weak{Map,Set}.prototype.clear. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years, 1 month 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 | « src/weak-collection.js ('k') | 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 60ce46b2e569e8a206a0923b0d46fe778570d9c4..92cd087839f13e8c5f9c3feac4abcdf29ff36a36 100644
--- a/test/mjsunit/es6/collections.js
+++ b/test/mjsunit/es6/collections.js
@@ -266,7 +266,6 @@ assertTrue(WeakMap.prototype.set instanceof Function)
assertTrue(WeakMap.prototype.get instanceof Function)
assertTrue(WeakMap.prototype.has instanceof Function)
assertTrue(WeakMap.prototype.delete instanceof Function)
-assertTrue(WeakMap.prototype.clear instanceof Function)
// Test some common JavaScript idioms for WeakSets
@@ -275,7 +274,6 @@ assertTrue(s instanceof WeakSet);
assertTrue(WeakSet.prototype.add instanceof Function)
assertTrue(WeakSet.prototype.has instanceof Function)
assertTrue(WeakSet.prototype.delete instanceof Function)
-assertTrue(WeakSet.prototype.clear instanceof Function)
// Test class of instance and prototype.
@@ -471,30 +469,6 @@ for (var i = 9; i >= 0; i--) {
})();
-// Test WeakMap clear
-(function() {
- var k = new Object();
- var w = new WeakMap();
- w.set(k, 23);
- assertTrue(w.has(k));
- assertEquals(23, w.get(k));
- w.clear();
- assertFalse(w.has(k));
- assertEquals(undefined, w.get(k));
-})();
-
-
-// Test WeakSet clear
-(function() {
- var k = new Object();
- var w = new WeakSet();
- w.add(k);
- assertTrue(w.has(k));
- w.clear();
- assertFalse(w.has(k));
-})();
-
-
(function TestMinusZeroSet() {
var s = new Set();
s.add(-0);
« no previous file with comments | « src/weak-collection.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698