diff options
authorMike Blumenkrantz <zmike@samsung.com>2019-02-04 10:04:46 -0500
committerDerek Foreman <derek.foreman.samsung@gmail.com>2019-02-04 14:11:48 -0600
commit93694ffd12d85b05728fd3075d58dc40538fdf80 (patch)
parenteo: implement class overriding (+unit tests) (diff)
tests: improve efl loop test (concentric)
I forgot to spin the sub-loop, so this was previously just a test to verify that the IDLE callback was working. now this spins the sub-loop on the idle callback and tests the idle enter callback to verify that the main loop is being iterated Reviewed-by: Derek Foreman <derekf@osg.samsung.com> Differential Revision: https://phab.enlightenment.org/D7874
1 files changed, 9 insertions, 2 deletions
diff --git a/src/tests/ecore/efl_app_test_loop.c b/src/tests/ecore/efl_app_test_loop.c
index f02af90707..b37ba414ab 100644
--- a/src/tests/ecore/efl_app_test_loop.c
+++ b/src/tests/ecore/efl_app_test_loop.c
@@ -46,7 +46,7 @@ efl_app_test_efl_loop_concentric_fail(void *data EINA_UNUSED, const Efl_Event *e
static void
-loop_idle(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
+loop_idle_enter(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
static int num = 0;
@@ -54,6 +54,12 @@ loop_idle(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
static void
+loop_idle(void *data, const Efl_Event *ev EINA_UNUSED)
+ efl_loop_iterate(data);
+static void
loop_timer_tick(void *data, const Efl_Event *ev EINA_UNUSED)
@@ -65,8 +71,9 @@ EFL_START_TEST(efl_app_test_efl_loop_concentric)
int exitcode;
loop = efl_main_loop_get();
- efl_event_callback_add(loop, EFL_LOOP_EVENT_IDLE, loop_idle, NULL);
loop2 = efl_add(EFL_LOOP_CLASS, loop);
+ efl_event_callback_add(loop, EFL_LOOP_EVENT_IDLE, loop_idle, loop2);
+ efl_event_callback_add(loop, EFL_LOOP_EVENT_IDLE_ENTER, loop_idle_enter, NULL);
timer = efl_add(EFL_LOOP_TIMER_CLASS, loop2,
efl_loop_timer_interval_set(efl_added, 0.01),
efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK, loop_timer_tick, loop)