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

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: Rebase 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
« no previous file with comments | « Source/heap/Visitor.h ('k') | Source/wtf/HashSet.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/heap/tests/HeapTest.cpp
diff --git a/Source/heap/tests/HeapTest.cpp b/Source/heap/tests/HeapTest.cpp
index 2f21ae81b7752b132cad671956a60fbddbe58baf..f25f0f944c27925baed9b604ac8197b03b76961f 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
« no previous file with comments | « Source/heap/Visitor.h ('k') | Source/wtf/HashSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698