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() );
107 #endif // WCONDITIONONESHOT_TEST_H
bool flag
Flag set to true when thread starts.
Implements a WCondition, but can be fired only ONCE.
void threadMain()
The thread.
virtual void notify()
Notifies all waiting threads.
WCondition * c
The condition to be used for signalling.
virtual void notify()
Notifies all waiting threads.
void testInstantiation(void)
An instantiation should never throw an exception, as well as tear down.
void testWaitNotify()
Test whether notification is working.
virtual void wait() const
Wait for the condition.
WConditionOneShot * c
The condition to use.