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 ) );
Class implementing a simple worker thread, since proper testing of WThreadedRunner itself is not usab...
virtual void threadMain()
Function that has to be overwritten for execution.
Tests the WThreadedRunner class.
void testSleep(void)
Ensure that nothing is thrown when going to sleep.
void testInstantiation(void)
Ensure that nothing is thrown when an instance is created.
void testRun(void)
Ensure that nothing is thrown when running thread.
Base class for all classes needing to be executed in a separate thread.
virtual void run()
Run thread.
void sleep(const int32_t t) const
Sets thread asleep.
void wait(bool requestFinish=false)
Wait for the thread to be finished.
WBoolFlag m_shutdownFlag
Condition getting fired whenever the thread should quit.