unittests_smartptr.cc 327 Bytes
Newer Older
1
#include "unittests_common.hh"
2

3
#if __cplusplus >= 201103L || _MSC_VER >= 1800
Jan Möbius's avatar
Jan Möbius committed
4

5
6
7
8
9
10
11
12
13
14
15
#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);
}

Jan Möbius's avatar
Jan Möbius committed
16
#endif