32 BOOST_CHECK_EQUAL( out->
getOutput(), in );
33 BOOST_CHECK_EQUAL( in->
getInput(), out );
46 BOOST_CHECK_EQUAL( out->
getOutput(), in );
47 BOOST_CHECK_EQUAL( in->
getInput(), out );
76 BOOST_CHECK_EQUAL( in1->
getInput(), out );
77 BOOST_CHECK_EQUAL( in2->
getInput(), out );
94 BOOST_CHECK_EQUAL( in1->
getInput(), out );
95 BOOST_CHECK_EQUAL( in2->
getInput(), out );
99 before_out->connectTo(out);
103 BOOST_CHECK( before_out->connected() );
113 BOOST_CHECK( !before_out->connected() );
133 BOOST_CHECK_EQUAL( out1->
getOutput(), in );
134 BOOST_CHECK_EQUAL( out2->
getOutput(), in );
151 BOOST_CHECK_EQUAL( out1->
getOutput(), in );
152 BOOST_CHECK_EQUAL( out2->
getOutput(), in );
156 after_in->connectFrom(in);
163 BOOST_CHECK( after_in->connected() );
170 BOOST_CHECK( !after_in->connected() );
194 BOOST_CHECK_EQUAL( out1->
getOutput(), mimo );
195 BOOST_CHECK_EQUAL( out2->
getOutput(), mimo );
204 BOOST_CHECK_EQUAL( in1->
getInput(), mimo );
205 BOOST_CHECK_EQUAL( in2->
getInput(), mimo );
212 BOOST_CHECK( !mimo->MultipleInputsChannelElementBase::connected() );
213 BOOST_CHECK( mimo->MultipleOutputsChannelElementBase::connected() );
234 BOOST_CHECK_EQUAL( out1->
getOutput(), mimo );
235 BOOST_CHECK_EQUAL( out2->
getOutput(), mimo );
236 BOOST_CHECK_EQUAL( in1->
getInput(), mimo );
237 BOOST_CHECK_EQUAL( in2->
getInput(), mimo );
271 BOOST_CHECK( out->
connectTo(in1,
false) );
272 BOOST_CHECK( out->
connectTo(in2,
false) );
276 BOOST_CHECK( data1->
read(x) ==
NewData && x == 1 );
277 BOOST_CHECK( data2->
read(x) ==
NewData && x == 1 );
285 BOOST_CHECK( data1->
read(x) ==
NewData && x == 2 );
286 BOOST_CHECK( data2->
read(x) ==
OldData && x == 1 );
295 BOOST_CHECK( data1->
read(x) ==
OldData && x == 2 );
296 BOOST_CHECK( data2->
read(x) ==
OldData && x == 1 );
300 BOOST_CHECK( out->
connectTo(in1,
true) );
301 BOOST_CHECK( out->
connectTo(in2,
true) );
305 BOOST_CHECK( data1->
read(x) ==
NewData && x == 1 );
306 BOOST_CHECK( data2->
read(x) ==
NewData && x == 1 );
314 BOOST_CHECK( data1->
read(x) ==
NewData && x == 2 );
315 BOOST_CHECK( data2->
read(x) ==
OldData && x == 1 );
324 BOOST_CHECK( data1->
read(x) ==
OldData && x == 2 );
325 BOOST_CHECK( data2->
read(x) ==
OldData && x == 1 );
boost::intrusive_ptr< ChannelElement< T > > shared_ptr
#define BOOST_AUTO_TEST_SUITE(suite_name)
boost::shared_ptr< DataObjectInterface< T > > shared_ptr
#define BOOST_AUTO_TEST_SUITE_END()
virtual bool connectTo(ChannelElementBase::shared_ptr const &output, bool mandatory=true)
virtual void disconnect(bool forward)
virtual FlowStatus read(reference_t sample, bool copy_old_data=true)
BOOST_AUTO_TEST_CASE(testChannelElementConnection)
virtual bool connectFrom(ChannelElementBase::shared_ptr const &input)
virtual WriteStatus write(param_t sample)
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.