Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gtests/blenlib/BLI_set_test.cc')
-rw-r--r--tests/gtests/blenlib/BLI_set_test.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/gtests/blenlib/BLI_set_test.cc b/tests/gtests/blenlib/BLI_set_test.cc
index f331639b345..5baf069557e 100644
--- a/tests/gtests/blenlib/BLI_set_test.cc
+++ b/tests/gtests/blenlib/BLI_set_test.cc
@@ -1,7 +1,10 @@
#include "testing/testing.h"
#include "BLI_set.h"
+#include "BLI_vector.h"
-using IntSet = BLI::Set<int>;
+using BLI::Set;
+using BLI::Vector;
+using IntSet = Set<int>;
TEST(set, Defaultconstructor)
{
@@ -187,3 +190,14 @@ TEST(set, OftenAddRemove)
EXPECT_EQ(set.size(), 0);
}
}
+
+TEST(set, UniquePtrValues)
+{
+ Set<std::unique_ptr<int>> set;
+ set.add_new(std::unique_ptr<int>(new int()));
+ auto value1 = std::unique_ptr<int>(new int());
+ set.add_new(std::move(value1));
+ set.add(std::unique_ptr<int>(new int()));
+
+ EXPECT_EQ(set.size(), 3);
+}