From a7a33fd95f15428b7030ef1b764fcf924d5199c8 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 26 Mar 2010 18:53:37 +0000 Subject: 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 --- unittests/ADT/SmallVectorTest.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'unittests') diff --git a/unittests/ADT/SmallVectorTest.cpp b/unittests/ADT/SmallVectorTest.cpp index d7dc3af52f..991c7d6caa 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 +#include using namespace llvm; @@ -399,4 +400,9 @@ TEST_F(SmallVectorTest, DirectVectorTest) { EXPECT_EQ(4, theVector[3].getValue()); } +TEST_F(SmallVectorTest, IteratorTest) { + std::list L; + theVector.insert(theVector.end(), L.begin(), L.end()); +} + } -- cgit v1.2.3