summaryrefslogtreecommitdiffstats
path: root/test/signal_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/signal_test.cpp')
-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);