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

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

Issue 1945223002: [Interpreter] Updates mjsunit/es6/mirror-collections to work with ignition (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Updated as suggested by Ross. Created 4 years, 7 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 | test/mjsunit/mjsunit.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/mirror-collections.js
diff --git a/test/mjsunit/es6/mirror-collections.js b/test/mjsunit/es6/mirror-collections.js
index 81a98b8a58aaa786ebd016578d36aac31af7f2eb..4232ef91cb41cab69ebfa0dcdad226e1d508be8c 100644
--- a/test/mjsunit/es6/mirror-collections.js
+++ b/test/mjsunit/es6/mirror-collections.js
@@ -88,16 +88,21 @@ assertEquals(1, setMirror.values(1).length);
assertSame(o2, values[0]);
assertEquals(undefined, values[1]);
+function initWeakMap(weakMap) {
+ weakMap.set(o1, 11);
+ weakMap.set(new Object(), 22);
+ weakMap.set(o3, 33);
+ weakMap.set(new Object(), 44);
+ var weakMapMirror = debug.MakeMirror(weakMap);
+ testMapMirror(weakMapMirror);
+ weakMap.set(new Object(), 55);
+ assertTrue(weakMapMirror.entries().length <= 5);
+ return weakMapMirror;
+}
+
// Test the mirror object for WeakMaps
var weakMap = new WeakMap();
-weakMap.set(o1, 11);
-weakMap.set(new Object(), 22);
-weakMap.set(o3, 33);
-weakMap.set(new Object(), 44);
-var weakMapMirror = debug.MakeMirror(weakMap);
-testMapMirror(weakMapMirror);
-weakMap.set(new Object(), 55);
-assertTrue(weakMapMirror.entries().length <= 5);
+var weakMapMirror = initWeakMap(weakMap);
gc();
function testWeakMapEntries(weakMapMirror) {
@@ -121,18 +126,23 @@ function testWeakMapEntries(weakMapMirror) {
testWeakMapEntries(weakMapMirror);
+function initWeakSet(weakSet) {
+ weakSet.add(o1);
+ weakSet.add(new Object());
+ weakSet.add(o2);
+ weakSet.add(new Object());
+ weakSet.add(new Object());
+ weakSet.add(o3);
+ weakSet.delete(o2);
+ var weakSetMirror = debug.MakeMirror(weakSet);
+ testSetMirror(weakSetMirror);
+ assertTrue(weakSetMirror.values().length <= 5);
+ return weakSetMirror;
+}
+
// Test the mirror object for WeakSets
var weakSet = new WeakSet();
-weakSet.add(o1);
-weakSet.add(new Object());
-weakSet.add(o2);
-weakSet.add(new Object());
-weakSet.add(new Object());
-weakSet.add(o3);
-weakSet.delete(o2);
-var weakSetMirror = debug.MakeMirror(weakSet);
-testSetMirror(weakSetMirror);
-assertTrue(weakSetMirror.values().length <= 5);
+var weakSetMirror = initWeakSet(weakSet);
gc();
function testWeakSetValues(weakSetMirror) {
« no previous file with comments | « no previous file | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698