summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/logic_.h11
-rw-r--r--tests/test_logic.cpp12
2 files changed, 22 insertions, 1 deletions
diff --git a/tests/logic_.h b/tests/logic_.h
index a02a003..2a14a62 100644
--- a/tests/logic_.h
+++ b/tests/logic_.h
@@ -83,12 +83,21 @@ public:
{
m_logic.timerStart(interval);
}
-
void timerStop()
{
m_logic.timerStop();
}
+ // gio operation
+ void run(guint timeout)
+ {
+ m_logic.run(timeout);
+ }
+ bool is_gmain_loop_running()
+ {
+ return m_logic.is_gmain_loop_running();
+ }
+
private:
Logic_ m_logic;
};
diff --git a/tests/test_logic.cpp b/tests/test_logic.cpp
index 8b32d7b..397b792 100644
--- a/tests/test_logic.cpp
+++ b/tests/test_logic.cpp
@@ -457,4 +457,16 @@ BOOST_AUTO_TEST_CASE(logic_workflow_timer) {
BOOST_REQUIRE(true);
}
+BOOST_AUTO_TEST_CASE(logic_workflow_gio_timeout) {
+
+ // Wait for setup.
+ BOOST_REQUIRE(setup() == NO_ERROR);
+ wait_for_worker();
+
+ // Run gmainloop.
+ run(3);
+
+ BOOST_REQUIRE(is_gmain_loop_running() == false);
+}
+
BOOST_AUTO_TEST_SUITE_END()