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"
61 boost::this_thread::sleep( boost::posix_time::seconds( 1 ) );
81 TS_ASSERT_THROWS_NOTHING(
delete c );
92 boost::shared_ptr< WCondition > c1 = boost::shared_ptr< WCondition >(
new WCondition() );
93 boost::shared_ptr< WCondition > c2 = boost::shared_ptr< WCondition >(
new WCondition() );
94 boost::shared_ptr< WCondition > c3 = boost::shared_ptr< WCondition >(
new WCondition() );
97 TS_ASSERT_THROWS_NOTHING( cs->
add( c1 ) );
99 TS_ASSERT_THROWS_NOTHING( cs->
add( c1 ) );
100 TS_ASSERT_THROWS_NOTHING( cs->
add( c2 ) );
106 TS_ASSERT_THROWS_NOTHING( cs->
remove( c3 ) );
110 TS_ASSERT_THROWS_NOTHING( cs->
remove( c1 ) );
114 TS_ASSERT_THROWS_NOTHING( cs->
remove( c2 ) );
128 boost::shared_ptr< WCondition > c1 = boost::shared_ptr< WCondition >(
new WCondition() );
129 boost::shared_ptr< WCondition > c2 = boost::shared_ptr< WCondition >(
new WCondition() );
174 boost::shared_ptr< WCondition > c1 = boost::shared_ptr< WCondition >(
new WCondition() );
175 boost::shared_ptr< WCondition > c2 = boost::shared_ptr< WCondition >(
new WCondition() );
222 TS_ASSERT_THROWS_NOTHING( cs->
reset() );
228 #endif // WCONDITIONSET_TEST_H