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

Unified Diff: Source/heap/HeapTest.cpp

Issue 183833009: Oilpan: Allowing hashing of RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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/HeapTest.cpp
diff --git a/Source/heap/HeapTest.cpp b/Source/heap/HeapTest.cpp
index 7f1b8852676d8d049884448e22e719ac496bf5c9..86683ddd37c307f87d3c978a4fbe58d556c4c318 100644
--- a/Source/heap/HeapTest.cpp
+++ b/Source/heap/HeapTest.cpp
@@ -2609,6 +2609,16 @@ TEST(HeapTest, EmbeddedInVector)
EXPECT_EQ(8, SimpleFinalizedObject::s_destructorCalls);
}
+TEST(HeapTest, RawPtrInHash)
+{
+ HashSet<RawPtr<int> > set;
+ set.add(new int(42));
+ set.add(new int(42));
+ EXPECT_EQ(2u, set.size());
+ for (HashSet<RawPtr<int> >::iterator it = set.begin(); it != set.end(); ++it)
+ EXPECT_EQ(42, **it);
+}
+
} // WebCore namespace
namespace WTF {
« no previous file with comments | « Source/heap/Handle.h ('k') | Source/wtf/HashFunctions.h » ('j') | Source/wtf/HashTraits.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698