summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2011-10-07 15:36:12 -0700
committerPixel <pixel@nobis-crew.org>2011-10-07 15:36:12 -0700
commit1d9def9edae0011eeee8f83dc32fb3797ca2f46b (patch)
tree29077945287dd4b0c13269b9f3e5dc97936551f9 /tests
parent5a283e5b2b523d53e3504292c386b534dc74386a (diff)
More work in the Task manager.
Also fixing a few bugs linked with the printer and TLS. Removed flto from compilation flags: this actually creates bad code (!)
Diffstat (limited to 'tests')
-rw-r--r--tests/test-Tasks.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/test-Tasks.cc b/tests/test-Tasks.cc
index bb7c795..2eedb47 100644
--- a/tests/test-Tasks.cc
+++ b/tests/test-Tasks.cc
@@ -6,8 +6,28 @@ BALAU_STARTUP;
using namespace Balau;
+class CustomPrinter : public Printer {
+};
+
+static CustomPrinter * customPrinter = NULL;
+
+class MainTask : public Task {
+ public:
+ virtual const char * getName() { return "MainTask"; }
+ private:
+ virtual void Do() {
+ customPrinter->setLocal();
+ Printer::enable(M_ALL);
+ Printer::log(M_DEBUG, "In MainTask::Do()");
+ }
+};
+
int Application::startup() throw (Balau::GeneralException) {
+ customPrinter = new CustomPrinter();
Printer::log(M_STATUS, "Test::Tasks running.");
+ Task * mainTask = new MainTask();
+ TaskMan::getTaskMan()->mainLoop();
Printer::log(M_STATUS, "Test::Tasks passed.");
+ Printer::log(M_DEBUG, "You shouldn't see that message.");
return 0;
}