diff options
Diffstat (limited to 'tests/gtests/blenlib/BLI_stack_cxx_test.cc')
-rw-r--r-- | tests/gtests/blenlib/BLI_stack_cxx_test.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/gtests/blenlib/BLI_stack_cxx_test.cc b/tests/gtests/blenlib/BLI_stack_cxx_test.cc index 02c5407fda3..436f1f307b9 100644 --- a/tests/gtests/blenlib/BLI_stack_cxx_test.cc +++ b/tests/gtests/blenlib/BLI_stack_cxx_test.cc @@ -1,7 +1,8 @@ #include "testing/testing.h" #include "BLI_stack_cxx.h" -using IntStack = BLI::Stack<int>; +using BLI::Stack; +using IntStack = Stack<int>; TEST(stack, DefaultConstructor) { @@ -50,3 +51,13 @@ TEST(stack, Peek) stack.pop(); EXPECT_EQ(stack.peek(), 3); } + +TEST(stack, UniquePtrValues) +{ + Stack<std::unique_ptr<int>> stack; + stack.push(std::unique_ptr<int>(new int())); + stack.push(std::unique_ptr<int>(new int())); + std::unique_ptr<int> a = stack.pop(); + std::unique_ptr<int> &b = stack.peek(); + UNUSED_VARS(a, b); +} |