25 #ifndef WCONDITIONONESHOT_TEST_H
26 #define WCONDITIONONESHOT_TEST_H
30 #include <boost/thread.hpp>
31 #include <cxxtest/TestSuite.h>
33 #include "../WConditionOneShot.h"
59 boost::this_thread::sleep( boost::posix_time::seconds( 1 ) );
78 TS_ASSERT_THROWS_NOTHING(
delete c );
103 TS_ASSERT_THROWS_NOTHING( c.
notify() );
WConditionOneShot * c
The condition to use.
bool flag
Flag set true when the thread starts.
void threadMain()
The thread.
void testInstantiation(void)
An instantiation as well as tear down should never throw an exception.
void testWaitNotify()
Test whether notification is working.
Implements a WCondition, but can be fired only ONCE.
virtual void notify()
Notifies all waiting threads.
virtual void wait() const
Wait for the condition.