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

Unified Diff: Source/wtf/VectorTest.cpp

Issue 654933004: Remove now-unnecessary VectorTraits specializations. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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/wtf/VectorTest.cpp
diff --git a/Source/wtf/VectorTest.cpp b/Source/wtf/VectorTest.cpp
index 3c1e4783e83e071bf2d14d519c87c356422abfab..1f31e287ee135a731bc450e9cc771125b5aec193 100644
--- a/Source/wtf/VectorTest.cpp
+++ b/Source/wtf/VectorTest.cpp
@@ -286,7 +286,6 @@ TEST(VectorTest, SwapWithInlineCapacity)
class Comparable {
};
-bool operator==(const Comparable& a, const Comparable& b) { return true; }
template<typename T> void compare()
{
@@ -302,4 +301,18 @@ TEST(VectorTest, Compare)
compare<Comparable>();
compare<WTF::String>();
}
+
+class PODTest {
+public:
+ Comparable m_struct;
+ WTF::WeakHandlingFlag m_enum;
+};
+
+TEST(VectorTest, Traits)
+{
+ // FIXME: expand, test more types.
+ COMPILE_ASSERT(!WTF::VectorTraits<PODTest>::needsDestruction, ExpectedToHaveATrivialDestructor);
+ COMPILE_ASSERT(WTF::VectorTraits<PODTest>::canInitializeWithMemset, ExpectedToBeInitializableWithMemset);
+}
+
} // namespace

Powered by Google App Engine
This is Rietveld 408576698