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 |