19 #include <boost/test/unit_test.hpp>
26 BOOST_AUTO_TEST_SUITE(physical)
43 BOOST_REQUIRE(module1Ptr != 0);
44 BOOST_REQUIRE(module2Ptr != 0);
49 BOOST_CHECK(module1Ptr->getAnchor().empty());
50 module1Ptr->setAnchor(anchor);
51 BOOST_CHECK(module1Ptr->getAnchor() == anchor);
57 BOOST_CHECK_EQUAL(module1Ptr->addPort(port1Ptr),
true);
58 BOOST_CHECK_EQUAL(module1Ptr->addPort(port2aPtr),
true);
59 BOOST_CHECK_EQUAL(module1Ptr->addPort(port2bPtr),
false);
60 BOOST_CHECK(module1Ptr->getPortCount() == 2);
69 BOOST_CHECK(*p++ == port1Ptr);
70 BOOST_CHECK(*p++ == port2aPtr);
72 BOOST_CHECK(*(module1Ptr->findPort(port)) == port1Ptr);
78 BOOST_CHECK_EQUAL(module1Ptr->removePort(port1Ptr),
true);
79 BOOST_CHECK_EQUAL(module1Ptr->removePort(port2aPtr),
true);
80 BOOST_CHECK_EQUAL(module1Ptr->removePort(port2bPtr),
false);
81 BOOST_CHECK(module1Ptr->getPortCount() == 0);
85 BOOST_CHECK(*module1Ptr == *module2Ptr);
88 BOOST_AUTO_TEST_SUITE_END()
Header for the Module class.
static PortSharedPtr newPortPtr(const string &inName, InstanceSharedPtr inInstancePtr, const string &inPinName)
Create and return a new Port shared pointer.
PortSharedPtrVector::const_iterator PortSharedPtrConstIterator
Constant iterator to Port shared pointers.
boost::shared_ptr< Port > PortSharedPtr
Shared pointer encapsulation of a Port.
BOOST_AUTO_TEST_CASE(XdlUnpackUnitTest)
Unit test for the XdlUnpack class.
boost::shared_ptr< Module > ModuleSharedPtr
Shared pointer encapsulation of a Module.
static InstanceSharedPtr newInstancePtr(const string &inName, const string &inType, const string &inTile, const string &inSite, EInstanceBonding inBonding=eInstanceBondingUnknown, InstanceReferenceSharedPtr inInstanceReferencePtr=InstanceReferenceSharedPtr())
Construct and return a new Instance shared pointer.
boost::shared_ptr< Instance > InstanceSharedPtr
Shared pointer encapsulation of an Instance.
static ModuleSharedPtr newModulePtr(const string &inName, const string &inAnchor)
Create and return a new Module shared pointer.
Header for the Factory class.