25 #ifndef WCONDITIONSET_TEST_H
26 #define WCONDITIONSET_TEST_H
30 #include <boost/thread.hpp>
31 #include <cxxtest/TestSuite.h>
33 #include "../WConditionSet.h"
34 #include "../WCondition.h"
60 boost::this_thread::sleep( boost::posix_time::seconds( 1 ) );
79 TS_ASSERT_THROWS_NOTHING(
delete c );
90 boost::shared_ptr< WCondition > c1(
new WCondition() );
91 boost::shared_ptr< WCondition > c2(
new WCondition() );
92 boost::shared_ptr< WCondition > c3(
new WCondition() );
95 TS_ASSERT_THROWS_NOTHING( cs->
add( c1 ) );
97 TS_ASSERT_THROWS_NOTHING( cs->
add( c1 ) );
98 TS_ASSERT_THROWS_NOTHING( cs->
add( c2 ) );
104 TS_ASSERT_THROWS_NOTHING( cs->
remove( c3 ) );
108 TS_ASSERT_THROWS_NOTHING( cs->
remove( c1 ) );
112 TS_ASSERT_THROWS_NOTHING( cs->
remove( c2 ) );
126 boost::shared_ptr< WCondition > c1(
new WCondition() );
127 boost::shared_ptr< WCondition > c2(
new WCondition() );
172 boost::shared_ptr< WCondition > c1(
new WCondition() );
173 boost::shared_ptr< WCondition > c2(
new WCondition() );
220 TS_ASSERT_THROWS_NOTHING( cs->
reset() );
226 #endif // WCONDITIONSET_TEST_H