Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenVolumeMesh
OpenVolumeMesh
Commits
d329942f
Commit
d329942f
authored
Nov 07, 2016
by
Martin Heistermann
Browse files
Add simple test for ptr::make_unique
parent
ab6fe51d
Pipeline
#3533
failed with stage
in 8 minutes and 5 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/Unittests/unittests_smartptr.cc
0 → 100644
View file @
d329942f
#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
);
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment