From d028adf7bc92c0595167bf41269ccded4e2f2823 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Sun, 9 Mar 2014 06:17:01 +0000 Subject: Clean up SmallString a bit Move a common utility (assign(iter, iter)) into SmallVector (some of the others could be moved there too, but this one seemed particularly generic) and replace repetitions overrides with using directives. And simplify SmallVector::assign(num, element) while I'm here rather than thrashing these files (that cause everyone to rebuild) again. llvm-svn: 203374 --- llvm/unittests/ADT/SmallVectorTest.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'llvm/unittests/ADT/SmallVectorTest.cpp') diff --git a/llvm/unittests/ADT/SmallVectorTest.cpp b/llvm/unittests/ADT/SmallVectorTest.cpp index 90c7982699a..0ecb7987797 100644 --- a/llvm/unittests/ADT/SmallVectorTest.cpp +++ b/llvm/unittests/ADT/SmallVectorTest.cpp @@ -338,6 +338,17 @@ TYPED_TEST(SmallVectorTest, AssignTest) { this->assertValuesInOrder(this->theVector, 2u, 77, 77); } +TYPED_TEST(SmallVectorTest, AssignIterPair) { + SCOPED_TRACE("AssignIterPair"); + + std::vector v; + v.push_back(1); + v.push_back(2); + this->theVector.push_back(Constructable(1)); + this->theVector.assign(v.begin(), v.end()); + this->assertValuesInOrder(this->theVector, 2u, 1, 2); +} + // Erase a single element TYPED_TEST(SmallVectorTest, EraseTest) { SCOPED_TRACE("EraseTest"); -- cgit v1.2.3