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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203374 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2014-03-09 06:17:01 +00:00
parent 873c589889
commit ed8ba2e58e
5 changed files with 49 additions and 49 deletions

View File

@ -338,6 +338,17 @@ TYPED_TEST(SmallVectorTest, AssignTest) {
this->assertValuesInOrder(this->theVector, 2u, 77, 77);
}
TYPED_TEST(SmallVectorTest, AssignIterPair) {
SCOPED_TRACE("AssignIterPair");
std::vector<int> 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");