aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ADT/SmallVectorTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/ADT/SmallVectorTest.cpp')
-rw-r--r--llvm/unittests/ADT/SmallVectorTest.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/unittests/ADT/SmallVectorTest.cpp b/llvm/unittests/ADT/SmallVectorTest.cpp
index b2cccc1..a533bb8 100644
--- a/llvm/unittests/ADT/SmallVectorTest.cpp
+++ b/llvm/unittests/ADT/SmallVectorTest.cpp
@@ -485,6 +485,15 @@ TYPED_TEST(SmallVectorTest, AppendRepeatedNonForwardIterator) {
this->assertValuesInOrder(this->theVector, 3u, 1, 7, 7);
}
+TYPED_TEST(SmallVectorTest, AppendSmallVector) {
+ SCOPED_TRACE("AppendSmallVector");
+
+ SmallVector<Constructable, 3> otherVector = {7, 7};
+ this->theVector.push_back(Constructable(1));
+ this->theVector.append(otherVector);
+ this->assertValuesInOrder(this->theVector, 3u, 1, 7, 7);
+}
+
// Assign test
TYPED_TEST(SmallVectorTest, AssignTest) {
SCOPED_TRACE("AssignTest");
@@ -513,6 +522,15 @@ TYPED_TEST(SmallVectorTest, AssignNonIterTest) {
this->assertValuesInOrder(this->theVector, 2u, 7, 7);
}
+TYPED_TEST(SmallVectorTest, AssignSmallVector) {
+ SCOPED_TRACE("AssignSmallVector");
+
+ SmallVector<Constructable, 3> otherVector = {7, 7};
+ this->theVector.push_back(Constructable(1));
+ this->theVector.assign(otherVector);
+ this->assertValuesInOrder(this->theVector, 2u, 7, 7);
+}
+
// Move-assign test
TYPED_TEST(SmallVectorTest, MoveAssignTest) {
SCOPED_TRACE("MoveAssignTest");