19 #include <boost/test/unit_test.hpp>
26 BOOST_AUTO_TEST_SUITE(physical)
29 class A : public Progenitor<class A> {};
30 class B :
public Progeny<class A> {};
37 progenitor_t::SharedPtrType progenitorPtr(
new A());
38 BOOST_REQUIRE(progenitorPtr.get() != 0);
39 progenitorPtr->setSelfWeakPtr(progenitorPtr);
49 BOOST_CHECK_EQUAL(progeny1.getParentWeakPtr().expired(),
true);
50 BOOST_CHECK_EQUAL(progeny2.getParentWeakPtr().expired(),
true);
51 progeny2.setParentWeakPtr(progenitorPtr);
52 BOOST_CHECK_EQUAL(progeny2.getParentWeakPtr().expired(),
false);
53 BOOST_CHECK(progeny2.getParentWeakPtr().lock() == progenitorPtr);
54 progeny1.setParentWeakPtr(progeny2.getParentWeakPtr());
55 progeny2.resetParentWeakPtr();
56 BOOST_CHECK(progeny1.getParentWeakPtr().lock() == progenitorPtr);
57 BOOST_CHECK_EQUAL(progeny1.getParentWeakPtr().expired(),
false);
58 BOOST_CHECK_EQUAL(progeny2.getParentWeakPtr().expired(),
true);
65 BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(XdlUnpackUnitTest)
Unit test for the XdlUnpack class.
Concept for any object that may have children.
Header for the Pip class.
Header for the Factory class.