summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-12-20 11:30:58 -0800
committerCedric BAIL <cedric.bail@free.fr>2019-01-02 13:39:12 -0800
commite9a434df9b2609f67546e0c99444d7ab17e715da (patch)
tree5e5a775d0dd8d3a354c08efea1c4aa747f07d8b1 /src
parentb351390b048b8de2ba32efe7af25e5dd69de78fe (diff)
eo: test that event cancel before emitting does propagate event.
Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de> Differential Revision: https://phab.enlightenment.org/D7496
Diffstat (limited to 'src')
-rw-r--r--src/tests/eo/signals/signals_main.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/tests/eo/signals/signals_main.c b/src/tests/eo/signals/signals_main.c
index 3639ff132d..58b9eda958 100644
--- a/src/tests/eo/signals/signals_main.c
+++ b/src/tests/eo/signals/signals_main.c
@@ -58,6 +58,22 @@ _restart_2_cb(void *data, const Efl_Event *event)
58 efl_event_callback_stop(event->object); 58 efl_event_callback_stop(event->object);
59} 59}
60 60
61static void
62_restart_3_cb(void *data, const Efl_Event *event)
63{
64 fprintf(stderr, "restart 3 inside: %i\n", inside);
65 fail_if(!inside);
66
67 fprintf(stderr, "restart 3 exit inside: %i (%i)\n", inside, called);
68 efl_event_callback_stop(event->object);
69
70 inside = EINA_TRUE;
71 efl_event_callback_call(event->object, event->desc, data);
72 inside = EINA_FALSE;
73
74 called++;
75}
76
61int 77int
62main(int argc, char *argv[]) 78main(int argc, char *argv[])
63{ 79{
@@ -198,10 +214,11 @@ main(int argc, char *argv[])
198 fail_if(fcount != 0); 214 fail_if(fcount != 0);
199 215
200 efl_event_callback_priority_add(obj, EV_RESTART, EFL_CALLBACK_PRIORITY_DEFAULT, _restart_1_cb, NULL); 216 efl_event_callback_priority_add(obj, EV_RESTART, EFL_CALLBACK_PRIORITY_DEFAULT, _restart_1_cb, NULL);
217 efl_event_callback_priority_add(obj, EV_RESTART, EFL_CALLBACK_PRIORITY_BEFORE, _restart_3_cb, NULL);
201 efl_event_callback_priority_add(obj, EV_RESTART, EFL_CALLBACK_PRIORITY_BEFORE, _restart_2_cb, NULL); 218 efl_event_callback_priority_add(obj, EV_RESTART, EFL_CALLBACK_PRIORITY_BEFORE, _restart_2_cb, NULL);
202 efl_event_callback_legacy_call(obj, EV_RESTART, NULL); 219 efl_event_callback_legacy_call(obj, EV_RESTART, NULL);
203 fail_if(inside); 220 fail_if(inside);
204 fail_if(called != 2); 221 fail_if(called != 3);
205 222
206 efl_unref(obj); 223 efl_unref(obj);
207 efl_object_shutdown(); 224 efl_object_shutdown();