summaryrefslogtreecommitdiff
path: root/src/tests/ecore/ecore_test_ecore.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-04-09 13:37:02 +0200
committerStefan Schmidt <stefan@osg.samsung.com>2018-04-10 11:28:01 +0200
commit88a6a3c76908d10d83c0f24e04ef2614fa4e94c2 (patch)
tree568edabb91db903900d97b9881fb7ce107220bc5 /src/tests/ecore/ecore_test_ecore.c
parent3b22dbc5af3a4759b375a8cc7fa9a414914302b5 (diff)
tests: split ecore idler tests into separate file
Summary: ref T6850 Depends on D5899 Reviewers: stefan_schmidt Subscribers: cedric Maniphest Tasks: T6850 Differential Revision: https://phab.enlightenment.org/D5900
Diffstat (limited to 'src/tests/ecore/ecore_test_ecore.c')
-rw-r--r--src/tests/ecore/ecore_test_ecore.c77
1 files changed, 0 insertions, 77 deletions
diff --git a/src/tests/ecore/ecore_test_ecore.c b/src/tests/ecore/ecore_test_ecore.c
index 7297b665a2..0314eebc6e 100644
--- a/src/tests/ecore/ecore_test_ecore.c
+++ b/src/tests/ecore/ecore_test_ecore.c
@@ -25,12 +25,6 @@ _quit_cb(void *data)
25 return EINA_FALSE; 25 return EINA_FALSE;
26} 26}
27 27
28static Eina_Bool
29_dummy_cb(void *data)
30{
31 return !!data;
32}
33
34EFL_START_TEST(ecore_test_ecore_init) 28EFL_START_TEST(ecore_test_ecore_init)
35{ 29{
36} 30}
@@ -50,73 +44,6 @@ EFL_START_TEST(ecore_test_ecore_main_loop)
50} 44}
51EFL_END_TEST 45EFL_END_TEST
52 46
53EFL_START_TEST(ecore_test_ecore_main_loop_idler)
54{
55 Eina_Bool did = EINA_FALSE;
56 Ecore_Idler *idler;
57
58 idler = ecore_idler_add(_quit_cb, &did);
59 fail_if(idler == NULL);
60
61 ecore_main_loop_begin();
62
63 fail_if(did == EINA_FALSE);
64}
65EFL_END_TEST
66
67EFL_START_TEST(ecore_test_ecore_main_loop_idle_enterer)
68{
69 Eina_Bool did = EINA_FALSE;
70 Ecore_Idle_Enterer *idle_enterer;
71
72
73 idle_enterer = ecore_idle_enterer_add(_quit_cb, &did);
74 fail_if(idle_enterer == NULL);
75
76 ecore_main_loop_begin();
77
78 fail_if(did == EINA_FALSE);
79
80}
81EFL_END_TEST
82
83EFL_START_TEST(ecore_test_ecore_main_loop_idle_before_enterer)
84{
85 Eina_Bool did = EINA_FALSE;
86 Ecore_Idle_Enterer *idle_enterer;
87
88
89 idle_enterer = ecore_idle_enterer_before_add(_quit_cb, &did);
90 fail_if(idle_enterer == NULL);
91
92 ecore_main_loop_begin();
93
94 fail_if(did == EINA_FALSE);
95
96}
97EFL_END_TEST
98
99EFL_START_TEST(ecore_test_ecore_main_loop_idle_exiter)
100{
101 Eina_Bool did = EINA_FALSE;
102 Ecore_Timer *timer;
103 Ecore_Idle_Exiter *idle_exiter;
104
105
106 /* make system exit idle */
107 timer = ecore_timer_add(0.0, _dummy_cb, (void *)(long)0);
108 fail_if(timer == NULL);
109
110 idle_exiter = ecore_idle_exiter_add(_quit_cb, &did);
111 fail_if(idle_exiter == NULL);
112
113 ecore_main_loop_begin();
114
115 fail_if(did == EINA_FALSE);
116
117}
118EFL_END_TEST
119
120 47
121// Disabled tests: inner main loops are not supposed to work! 48// Disabled tests: inner main loops are not supposed to work!
122#if 0 49#if 0
@@ -685,10 +612,6 @@ void ecore_test_ecore(TCase *tc)
685{ 612{
686 tcase_add_test(tc, ecore_test_ecore_init); 613 tcase_add_test(tc, ecore_test_ecore_init);
687 tcase_add_test(tc, ecore_test_ecore_main_loop); 614 tcase_add_test(tc, ecore_test_ecore_main_loop);
688 tcase_add_test(tc, ecore_test_ecore_main_loop_idler);
689 tcase_add_test(tc, ecore_test_ecore_main_loop_idle_enterer);
690 tcase_add_test(tc, ecore_test_ecore_main_loop_idle_before_enterer);
691 tcase_add_test(tc, ecore_test_ecore_main_loop_idle_exiter);
692 tcase_add_test(tc, ecore_test_ecore_main_loop_fd_handler); 615 tcase_add_test(tc, ecore_test_ecore_main_loop_fd_handler);
693 tcase_add_test(tc, ecore_test_ecore_main_loop_fd_handler_valid_flags); 616 tcase_add_test(tc, ecore_test_ecore_main_loop_fd_handler_valid_flags);
694 tcase_add_test(tc, ecore_test_ecore_main_loop_fd_handler_activate_modify); 617 tcase_add_test(tc, ecore_test_ecore_main_loop_fd_handler_activate_modify);