summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorancarola <raffaele.ancarola@epfl.ch>2019-01-26 23:21:33 +0100
committerancarola <raffaele.ancarola@epfl.ch>2019-01-26 23:21:33 +0100
commitb04597405eaca00add8eddc7cb82518618c416d0 (patch)
tree5200cccf718b0dc2f567bcc8c3351a4b6f460176 /test
parentFix signal template error (diff)
downloadflatland-b04597405eaca00add8eddc7cb82518618c416d0.tar.gz
flatland-b04597405eaca00add8eddc7cb82518618c416d0.zip
Testing signal
Diffstat (limited to 'test')
-rw-r--r--test/signal_test.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/signal_test.cpp b/test/signal_test.cpp
index cd487b0..db5b571 100644
--- a/test/signal_test.cpp
+++ b/test/signal_test.cpp
@@ -3,6 +3,7 @@
#include "object.hpp"
#include "window.hpp"
#include "flatland.hpp"
+#include "exceptions/forcequit.hpp"
#include <iostream>
@@ -76,6 +77,9 @@ void lifeloop()
// quit request
flat::core_channel().emit(quit);
}
+
+ if (steps > 2100)
+ throw flat::ForceQuit("Too many steps");
}
int main()
@@ -85,6 +89,12 @@ int main()
alpha = channel::create("alpha");
+ if (alpha == nullptr)
+ {
+ cout << "Could not create channel alpha" << endl;
+ return -1;
+ }
+
// create sender
m_sender = new sender("Ciao", alpha);
m_listener = new c_listener(alpha);