Skip to content
Snippets Groups Projects
Commit 8fafa3f0 authored by Fabian Reister's avatar Fabian Reister
Browse files

Merge remote-tracking branch 'origin/master' into feature/armem-object-memory-articulated-objects

parents f76f836f b02ec1c8
No related branches found
No related tags found
No related merge requests found
......@@ -231,6 +231,11 @@ namespace armarx::armem::base
Base::_copySelf(other);
other.aronType() = _aronType;
}
virtual void _copySelfEmpty(DerivedT& other) const override
{
Base::_copySelfEmpty(other);
other.aronType() = _aronType;
}
};
......
......@@ -222,6 +222,11 @@ namespace armarx::armem::base
Base::_copySelf(other);
other.aronType() = _aronType;
}
virtual void _copySelfEmpty(DerivedT& other) const override
{
Base::_copySelfEmpty(other);
other.aronType() = _aronType;
}
};
......
......@@ -171,7 +171,7 @@ namespace ArMemMemoryTest
MemoryContainerCtorOpTestFixture()
{
cont.container() = std::vector<int>{ -1, 2, -3 };
cont.container() = std::vector<int> { -1, 2, -3 };
BOOST_CHECK_EQUAL(cont.id(), id);
BOOST_CHECK_EQUAL(cont.size(), 3);
}
......@@ -496,6 +496,12 @@ struct CopyMoveCtorsOpsTest : public CopyMoveCtorsOpsTestBase
BOOST_CHECK_EQUAL(in.id(), id);
BOOST_CHECK_EQUAL(in.size(), 1);
if constexpr(std::is_base_of_v <armarx::armem::base::detail::AronTyped, T>)
{
in.aronType() = std::make_shared<aron::typenavigator::ObjectNavigator>();
BOOST_CHECK(in.aronType());
}
}
void testCopyCtor() override
......@@ -506,6 +512,13 @@ struct CopyMoveCtorsOpsTest : public CopyMoveCtorsOpsTestBase
BOOST_CHECK_EQUAL(out.id(), id);
BOOST_CHECK_EQUAL(out.size(), 1);
if constexpr(std::is_base_of_v <armarx::armem::base::detail::AronTyped, T>)
{
BOOST_CHECK(in.aronType());
BOOST_CHECK(out.aronType());
BOOST_CHECK_EQUAL(in.aronType(), out.aronType());
}
CustomChecks<T>::checkEqual(out, in);
}
void testCopyOp() override
......@@ -517,6 +530,13 @@ struct CopyMoveCtorsOpsTest : public CopyMoveCtorsOpsTestBase
BOOST_CHECK_EQUAL(out.id(), id);
BOOST_CHECK_EQUAL(out.size(), 1);
if constexpr(std::is_base_of_v <armarx::armem::base::detail::AronTyped, T>)
{
BOOST_CHECK(in.aronType());
BOOST_CHECK(out.aronType());
BOOST_CHECK_EQUAL(in.aronType(), out.aronType());
}
CustomChecks<T>::checkEqual(out, in);
}
void testMoveCtor() override
......@@ -528,6 +548,12 @@ struct CopyMoveCtorsOpsTest : public CopyMoveCtorsOpsTestBase
BOOST_CHECK_EQUAL(out.id(), id);
BOOST_CHECK_EQUAL(out.size(), 1);
if constexpr(std::is_base_of_v <armarx::armem::base::detail::AronTyped, T>)
{
BOOST_CHECK(out.aronType());
BOOST_CHECK_EQUAL(in.aronType(), nullptr);
}
CustomChecks<T>::checkMoved(in);
}
void testMoveOp() override
......@@ -540,6 +566,12 @@ struct CopyMoveCtorsOpsTest : public CopyMoveCtorsOpsTestBase
BOOST_CHECK_EQUAL(out.id(), id);
BOOST_CHECK_EQUAL(out.size(), 1);
if constexpr(std::is_base_of_v <armarx::armem::base::detail::AronTyped, T>)
{
BOOST_CHECK(out.aronType());
BOOST_CHECK_EQUAL(in.aronType(), nullptr);
}
CustomChecks<T>::checkMoved(in);
}
};
......@@ -781,7 +813,7 @@ struct CopyTest
T t;
T t2 = t.copy();
if constexpr (!std::is_base_of_v<armem::base::EntityInstanceBase<T>, T>)
if constexpr(!std::is_base_of_v<armem::base::EntityInstanceBase<T>, T>)
{
t2 = t.copyEmpty();
}
......@@ -816,3 +848,4 @@ BOOST_AUTO_TEST_CASE(test_copy)
CopyTest<armem::d_ltm::Memory>().test();
}
}
......@@ -192,8 +192,8 @@ namespace armarx::armem::server::obj::instance
update.instancesData.push_back(dto.toAron());
}
iceMemory.commit(commit);
}
iceMemory.commit(commit);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment