summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test-Sanity.cc3
-rw-r--r--tests/test-String.cc3
-rw-r--r--tests/test-Tasks.cc14
3 files changed, 10 insertions, 10 deletions
diff --git a/tests/test-Sanity.cc b/tests/test-Sanity.cc
index 1495f76..52a85cc 100644
--- a/tests/test-Sanity.cc
+++ b/tests/test-Sanity.cc
@@ -4,11 +4,10 @@ BALAU_STARTUP;
using namespace Balau;
-int Application::startup() throw (Balau::GeneralException) {
+void MainTask::Do() {
Printer::log(M_STATUS, "Test::Sanity running.");
Assert(sizeof(off_t) == 8);
Printer::log(M_STATUS, "Test::Sanity passed.");
- return 0;
}
diff --git a/tests/test-String.cc b/tests/test-String.cc
index 36c87e4..8e6eacb 100644
--- a/tests/test-String.cc
+++ b/tests/test-String.cc
@@ -5,7 +5,7 @@ BALAU_STARTUP;
using namespace Balau;
-int Application::startup() throw (Balau::GeneralException) {
+void MainTask::Do() {
Printer::log(M_STATUS, "Test::String running.");
String x = "foobar";
@@ -46,5 +46,4 @@ int Application::startup() throw (Balau::GeneralException) {
Assert(((unsigned char) y[0]) == 0xe9);
Printer::log(M_STATUS, "Test::String passed.");
- return 0;
}
diff --git a/tests/test-Tasks.cc b/tests/test-Tasks.cc
index 2eedb47..dcc692c 100644
--- a/tests/test-Tasks.cc
+++ b/tests/test-Tasks.cc
@@ -11,23 +11,25 @@ class CustomPrinter : public Printer {
static CustomPrinter * customPrinter = NULL;
-class MainTask : public Task {
+class TestTask : public Task {
public:
virtual const char * getName() { return "MainTask"; }
private:
virtual void Do() {
+ Printer::log(M_STATUS, "xyz");
customPrinter->setLocal();
Printer::enable(M_ALL);
- Printer::log(M_DEBUG, "In MainTask::Do()");
+ Printer::log(M_DEBUG, "In TestTask::Do()");
}
};
-int Application::startup() throw (Balau::GeneralException) {
+void MainTask::Do() {
customPrinter = new CustomPrinter();
Printer::log(M_STATUS, "Test::Tasks running.");
- Task * mainTask = new MainTask();
- TaskMan::getTaskMan()->mainLoop();
+ Task * testTask = new TestTask();
+ Events::TaskEvent e(testTask);
+ waitFor(&e);
+ suspend();
Printer::log(M_STATUS, "Test::Tasks passed.");
Printer::log(M_DEBUG, "You shouldn't see that message.");
- return 0;
}