Skip to content
Snippets Groups Projects
Commit d329942f authored by Martin Heistermann's avatar Martin Heistermann
Browse files

Add simple test for ptr::make_unique

parent ab6fe51d
No related branches found
No related tags found
1 merge request!13Break compatibility with pre-C++11, implement make_unique
Pipeline #
#include <gtest/gtest.h>
#include <OpenVolumeMesh/System/MemoryInclude.hh>
TEST(MakeUniqueTest, MakeUniqueTest) {
std::unique_ptr<int> foo;
auto bar = ptr::make_unique<int>(5);
foo = std::move(bar);
EXPECT_EQ(*foo, 5);
EXPECT_EQ(bar.get(), nullptr);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment