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

Unified Diff: Source/heap/tests/HeapTest.cpp

Issue 23042005: [oilpan] Fix iterators over member collections to return Result<T> (Closed) Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 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
Index: Source/heap/tests/HeapTest.cpp
diff --git a/Source/heap/tests/HeapTest.cpp b/Source/heap/tests/HeapTest.cpp
index 6c051ca46ceb52e870279adf03d2573b80a67c38..fcd2102d4fc3b99029fbbfdd73273d47d6fa24f4 100644
--- a/Source/heap/tests/HeapTest.cpp
+++ b/Source/heap/tests/HeapTest.cpp
@@ -1146,15 +1146,18 @@ void HeapTester::hashSetMembers()
EXPECT_TRUE(afterAdding1000.totalObjectSpace() > afterGC2.totalObjectSpace());
EXPECT_EQ(set->size(), 1000);
- int i = 0, ninetyNines = 0;
+ int i = 0, ninetyNines = 0, threeSixties = 0;
for (HeapSet::iterator it(set->begin(&set)), end(set->end(&set)); it != end; ++it) {
HandleScope forScope;
- if (Handle<IntWrapper>(*it.get())->value() == 99)
+ if (it.get()->value() == 99)
ninetyNines++;
+ if (it->value() == 360)
+ threeSixties++;
i++;
}
EXPECT_EQ(i, 1000);
EXPECT_EQ(ninetyNines, 1);
+ EXPECT_EQ(threeSixties, 1);
// Equality is by underlying pointer, so there are two different
// IntWrappers in there now that contain '1'. We add one of them
« Source/heap/Visitor.h ('K') | « Source/heap/Visitor.h ('k') | Source/wtf/HashSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698