Skip to content
Snippets Groups Projects

Refactor inheritance in armem/core

Merged Rainer Kartmann requested to merge armem/refactor-inheritance into armem/dev
1 file
+ 27
0
Compare changes
  • Side-by-side
  • Inline
@@ -137,3 +137,30 @@ BOOST_AUTO_TEST_CASE(test_MemoryID_from_to_string)
}
BOOST_AUTO_TEST_CASE(test_MemoryID_copy_move_ctors_ops)
{
const armem::MemoryID id("A/B/C/123/1"), moved("////1"); // int is not moved
{
const armem::MemoryID out(id);
BOOST_CHECK_EQUAL(out, id);
}
{
armem::MemoryID out;
out = id;
BOOST_CHECK_EQUAL(out, id);
}
{
armem::MemoryID in = id;
const armem::MemoryID out(std::move(in));
BOOST_CHECK_EQUAL(in, moved);
BOOST_CHECK_EQUAL(out, id);
}
{
armem::MemoryID in = id;
armem::MemoryID out;
out = std::move(in);
BOOST_CHECK_EQUAL(in, moved);
BOOST_CHECK_EQUAL(out, id);
}
}
Loading