#include "gtest/gtest.h"
#include "llvm/ADT/SmallVector.h"
#include <stdarg.h>
+#include <list>
using namespace llvm;
// 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;
EXPECT_EQ(4, theVector[3].getValue());
}
+TEST_F(SmallVectorTest, IteratorTest) {
+ std::list<int> L;
+ theVector.insert(theVector.end(), L.begin(), L.end());
+}
+
}