diff options
author | ancarola <raffaele.ancarola@epfl.ch> | 2019-01-26 23:21:33 +0100 |
---|---|---|
committer | ancarola <raffaele.ancarola@epfl.ch> | 2019-01-26 23:21:33 +0100 |
commit | b04597405eaca00add8eddc7cb82518618c416d0 (patch) | |
tree | 5200cccf718b0dc2f567bcc8c3351a4b6f460176 /test | |
parent | Fix signal template error (diff) | |
download | flatland-b04597405eaca00add8eddc7cb82518618c416d0.tar.gz flatland-b04597405eaca00add8eddc7cb82518618c416d0.zip |
Testing signal
Diffstat (limited to 'test')
-rw-r--r-- | test/signal_test.cpp | 10 |
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); |