Chromium Code Reviews| Index: Source/wtf/VectorTest.cpp |
| diff --git a/Source/wtf/VectorTest.cpp b/Source/wtf/VectorTest.cpp |
| index c099e684ae9c4bba8c9744b59cea179a6aaf52ef..9bad0645e2475079092b7cc24f5c59dff4fbae73 100644 |
| --- a/Source/wtf/VectorTest.cpp |
| +++ b/Source/wtf/VectorTest.cpp |
| @@ -28,6 +28,7 @@ |
| #include "wtf/HashSet.h" |
| #include "wtf/OwnPtr.h" |
| #include "wtf/PassOwnPtr.h" |
| +#include "wtf/text/WTFString.h" |
| #include "wtf/Vector.h" |
| #include <gtest/gtest.h> |
| @@ -283,4 +284,20 @@ TEST(VectorTest, SwapWithInlineCapacity) |
| vectorB.swap(vectorA); |
| } |
| +class Comparable { |
| +}; |
| +bool operator==(const Comparable& a, const Comparable& b) { return true; } |
| + |
| +template<typename T> void compare() |
| +{ |
| + Vector<T> vector1, vector2; |
| + EXPECT_TRUE(vector1 == vector2); |
|
tkent
2014/06/16 04:42:26
More test cases.
- LHS has internal buffer, RHS h
yoichio
2014/06/16 04:58:45
Done.
|
| +} |
| + |
| +TEST(VectorTest, Compare) |
| +{ |
| + compare<int>(); |
| + compare<Comparable>(); |
| + compare<WTF::String>(); |
| +} |
| } // namespace |