aboutsummaryrefslogtreecommitdiffstats
path: root/unittests/ADT/SmallVectorTest.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-03-26 18:53:37 +0000
committerDan Gohman <gohman@apple.com>2010-03-26 18:53:37 +0000
commit17e0a7840513bb57799cfaf23bd8e8a90c1323e1 (patch)
tree9a70776d5e93a1975d7303bf43ce8ee723c9d62f /unittests/ADT/SmallVectorTest.cpp
parent6c24fc0ed48d4fd0b36f63999deedd1622e29232 (diff)
downloadexternal_llvm-17e0a7840513bb57799cfaf23bd8e8a90c1323e1.zip
external_llvm-17e0a7840513bb57799cfaf23bd8e8a90c1323e1.tar.gz
external_llvm-17e0a7840513bb57799cfaf23bd8e8a90c1323e1.tar.bz2
Fix SmallVector's insert to handle non-random-access iterators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99633 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/ADT/SmallVectorTest.cpp')
-rw-r--r--unittests/ADT/SmallVectorTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/unittests/ADT/SmallVectorTest.cpp b/unittests/ADT/SmallVectorTest.cpp
index d7dc3af..991c7d6 100644
--- a/unittests/ADT/SmallVectorTest.cpp
+++ b/unittests/ADT/SmallVectorTest.cpp
@@ -14,6 +14,7 @@
#include "gtest/gtest.h"
#include "llvm/ADT/SmallVector.h"
#include <stdarg.h>
+#include <list>
using namespace llvm;
@@ -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());
+}
+
}