diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-Tasks.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/test-Tasks.cc b/tests/test-Tasks.cc index 8de9cf1..148f943 100644 --- a/tests/test-Tasks.cc +++ b/tests/test-Tasks.cc @@ -25,10 +25,20 @@ class TestTask : public Task { void MainTask::Do() { customPrinter = new CustomPrinter(); Printer::log(M_STATUS, "Test::Tasks running."); + Task * testTask = new TestTask(); - Events::TaskEvent e(testTask); - waitFor(&e); + Events::TaskEvent taskEvt(testTask); + waitFor(&taskEvt); + Assert(!taskEvt.gotSignal()); + suspend(); + Assert(taskEvt.gotSignal()); + + Events::Timeout timeout(0.1); + waitFor(&timeout); + Assert(!timeout.gotSignal()); suspend(); + Assert(timeout.gotSignal()); + Printer::log(M_STATUS, "Test::Tasks passed."); Printer::log(M_DEBUG, "You shouldn't see that message."); } |