25 #ifndef WTHREADEDRUNNER_TEST_H
26 #define WTHREADEDRUNNER_TEST_H
30 #include <cxxtest/TestSuite.h>
32 #include "../WThreadedRunner.h"
77 TS_ASSERT_THROWS_NOTHING( t.
sleep( 1 ) );
87 TS_ASSERT_THROWS_NOTHING( t.
run() );
88 TS_ASSERT_THROWS_NOTHING( t.
wait(
true ) );
92 #endif // WTHREADEDRUNNER_TEST_H
void testInstantiation(void)
Ensure that nothing is thrown when an instance is created.
virtual void run()
Run thread.
Base class for all classes needing to be executed in a separate thread.
void testRun(void)
Ensure that nothing is thrown when running thread.
virtual void threadMain()
Function that has to be overwritten for execution.
void sleep(const int32_t t) const
Sets thread asleep.
Class implementing a simple worker thread, since proper testing of WThreadedRunner itself is not usab...
Tests the WThreadedRunner class.
WBoolFlag m_shutdownFlag
Condition getting fired whenever the thread should quit.
void testSleep(void)
Ensure that nothing is thrown when going to sleep.
void wait(bool requestFinish=false)
Wait for the thread to be finished.