Remove the duplicate multiclass N3VSh_QHSD and use N3VInt_QHSD which is modified
[oota-llvm.git] / unittests / ADT / SmallVectorTest.cpp
index 8a817966cb8fd0b27cd301a76e450923b09b4ff8..991c7d6caac758e2095cc7d9ea2b724cd768a202 100644 (file)
@@ -14,6 +14,7 @@
 #include "gtest/gtest.h"
 #include "llvm/ADT/SmallVector.h"
 #include <stdarg.h>
+#include <list>
 
 using namespace llvm;
 
@@ -384,7 +385,7 @@ TEST_F(SmallVectorTest, ConstVectorTest) {
 // Direct array access.
 TEST_F(SmallVectorTest, DirectVectorTest) {
   EXPECT_EQ(0u, theVector.size());
-  EXPECT_EQ(4u, theVector.capacity());
+  EXPECT_LE(4u, theVector.capacity());
   EXPECT_EQ(0, Constructable::getNumConstructorCalls());
   theVector.end()[0] = 1;
   theVector.end()[1] = 2;
@@ -399,4 +400,9 @@ TEST_F(SmallVectorTest, DirectVectorTest) {
   EXPECT_EQ(4, theVector[3].getValue());
 }
 
+TEST_F(SmallVectorTest, IteratorTest) {
+  std::list<int> L;
+  theVector.insert(theVector.end(), L.begin(), L.end());
+}
+
 }