46 std::string filename =
"testPropMarsh.tst";
57 b1.
value().addProperty( b2 );
58 b2.
value().addProperty( p1 );
73 BOOST_REQUIRE( bag.ready() );
74 BOOST_CHECK( bag.getDescription() ==
"b1d" );
76 bag = bag.rvalue().getProperty(
"b2");
77 BOOST_REQUIRE( bag.ready() );
78 BOOST_CHECK( bag.getDescription() ==
"b2d" );
81 BOOST_REQUIRE( pi.ready() );
82 BOOST_CHECK( pi.get() == -1 );
83 BOOST_CHECK( pi.getDescription() ==
"p1d" );
90 std::string filename =
"testPropMarshVect.tst";
106 p1->
set() = std::vector<double>(3, 0.234);
115 BOOST_REQUIRE( bag.ready() );
116 BOOST_CHECK( bag.getDescription() ==
"p1d" );
117 BOOST_CHECK_EQUAL( bag.rvalue().size(), 7 );
125 BOOST_REQUIRE( p1->
ready() );
126 BOOST_CHECK_EQUAL( p1->
rvalue().size() , 7 );
127 BOOST_CHECK_EQUAL( p1->
rvalue()[0] , 1.234 );
150 BOOST_REQUIRE( bag.ready() );
152 BOOST_CHECK_EQUAL( bag.value().size() , 7 );
160 BOOST_REQUIRE( p1->
ready() );
163 BOOST_CHECK_EQUAL( p1->
rvalue().size() , 6 );
164 BOOST_CHECK_EQUAL( p1->
rvalue()[0] , 1 );
#define BOOST_FIXTURE_TEST_SUITE(suite_name, F)
bool updateProperties(PropertyBag &target, const PropertyBag &source)
bool refreshProperties(const PropertyBag &target, const PropertyBag &source, bool allprops)
#define BOOST_AUTO_TEST_SUITE_END()
bool RTT_API composePropertyBag(PropertyBag const &sourcebag, PropertyBag &target)
const_reference_t rvalue() const
A container for holding references to properties.
virtual bool deserialize(PropertyBag &v)
void deletePropertyBag(PropertyBag &target)
Property< T > & addProperty(const std::string &name, T &attr)
The default Orocos demarshaller for extracting properties and property bags from a property file...
base::PropertyBase * getProperty(const std::string &name) const
virtual void serialize(base::PropertyBase *v)
BOOST_AUTO_TEST_CASE(testPropMarsh)
Test writing some properties and reading the same file back in.