ecore: add test case for idler enterer function
authorVivek Ellur <vivek.ellur@samsung.com>
Sat, 31 Oct 2015 01:37:17 +0000 (02:37 +0100)
committerCedric BAIL <cedric@osg.samsung.com>
Sat, 31 Oct 2015 01:37:20 +0000 (02:37 +0100)
Summary:
Added test case for ecore_idle_enterer_before_add function

Signed-off-by: Vivek Ellur <vivek.ellur@samsung.com>
Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3253

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/tests/ecore/ecore_test_ecore.c

index 08a00e2..a5331b4 100644 (file)
@@ -106,6 +106,26 @@ START_TEST(ecore_test_ecore_main_loop_idle_enterer)
 }
 END_TEST
 
+START_TEST(ecore_test_ecore_main_loop_idle_before_enterer)
+{
+   Eina_Bool did = EINA_FALSE;
+   Ecore_Idle_Enterer *idle_enterer;
+   int ret;
+
+   ret = ecore_init();
+   fail_if(ret < 1);
+
+   idle_enterer = ecore_idle_enterer_before_add(_quit_cb, &did);
+   fail_if(idle_enterer == NULL);
+
+   ecore_main_loop_begin();
+
+   fail_if(did == EINA_FALSE);
+
+   ret = ecore_shutdown();
+}
+END_TEST
+
 START_TEST(ecore_test_ecore_main_loop_idle_exiter)
 {
    Eina_Bool did = EINA_FALSE;
@@ -681,6 +701,7 @@ void ecore_test_ecore(TCase *tc)
    tcase_add_test(tc, ecore_test_ecore_main_loop);
    tcase_add_test(tc, ecore_test_ecore_main_loop_idler);
    tcase_add_test(tc, ecore_test_ecore_main_loop_idle_enterer);
+   tcase_add_test(tc, ecore_test_ecore_main_loop_idle_before_enterer);
    tcase_add_test(tc, ecore_test_ecore_main_loop_idle_exiter);
    tcase_add_test(tc, ecore_test_ecore_main_loop_timer);
    tcase_add_test(tc, ecore_test_ecore_main_loop_fd_handler);