diff options
author | sangwan.kwon <sangwan.kwon@samsung.com> | 2016-05-19 19:21:49 +0900 |
---|---|---|
committer | sangwan.kwon <sangwan.kwon@samsung.com> | 2016-05-20 10:31:57 +0900 |
commit | 21fd08ff2804662923e084d3bad9f304af6df8fc (patch) | |
tree | c4625ab71e0396530031bf96c2b1f54cd3b26142 | |
parent | 74fb2b737fe457a29f86ef5de0d0be44cf721bac (diff) | |
download | cert-checker-21fd08ff2804662923e084d3bad9f304af6df8fc.tar.gz cert-checker-21fd08ff2804662923e084d3bad9f304af6df8fc.tar.bz2 cert-checker-21fd08ff2804662923e084d3bad9f304af6df8fc.zip |
Add TC for g_main_loop timeout
Change-Id: I70e1185c5b86d8fe8d8b03c0ff9559582d8d96c8
-rw-r--r-- | tests/logic_.h | 11 | ||||
-rw-r--r-- | tests/test_logic.cpp | 12 |
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() |