summaryrefslogtreecommitdiff
path: root/src/tests/eo/suite
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2016-12-01 12:40:36 +0100
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2016-12-02 12:27:37 +0100
commit0f72c8a031e885ff2d28c2ab1c58d45c1186f102 (patch)
tree4fb55e45fc62ecff5439e6bdb7953e44a2a8a746 /src/tests/eo/suite
parenta035bc1292ff8ad73e219b139d7d4c02d10b0c50 (diff)
eo: use the event stack to define behaviour
subscriptions are only executed if they were already subscriped at the start of the event emission.
Diffstat (limited to 'src/tests/eo/suite')
-rw-r--r--src/tests/eo/suite/eo_test_event.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/tests/eo/suite/eo_test_event.c b/src/tests/eo/suite/eo_test_event.c
index f8727fa022..b12280116b 100644
--- a/src/tests/eo/suite/eo_test_event.c
+++ b/src/tests/eo/suite/eo_test_event.c
@@ -60,13 +60,18 @@ START_TEST(eo_event)
60 efl_object_init(); 60 efl_object_init();
61 Eo *obj; 61 Eo *obj;
62 62
63 memset(&data, 0, sizeof(Test_Data));
64
65 obj = efl_add(efl_test_event_class_get(), NULL); 63 obj = efl_add(efl_test_event_class_get(), NULL);
66 efl_event_callback_priority_add(obj, EFL_TEST_EVENT_EVENT_TESTER, EFL_CALLBACK_PRIORITY_BEFORE, _cb2, &data); 64 efl_event_callback_priority_add(obj, EFL_TEST_EVENT_EVENT_TESTER, EFL_CALLBACK_PRIORITY_BEFORE, _cb2, &data);
67 efl_event_callback_priority_add(obj, EFL_TEST_EVENT_EVENT_TESTER, EFL_CALLBACK_PRIORITY_BEFORE, _cb1, &data); 65 efl_event_callback_priority_add(obj, EFL_TEST_EVENT_EVENT_TESTER, EFL_CALLBACK_PRIORITY_BEFORE, _cb1, &data);
66
67 memset(&data, 0, sizeof(Test_Data));
68 efl_event_callback_call(obj, EFL_TEST_EVENT_EVENT_TESTER, NULL); 68 efl_event_callback_call(obj, EFL_TEST_EVENT_EVENT_TESTER, NULL);
69 ck_assert_int_ne(data.event1, 0);
70 ck_assert_int_ne(data.event2, 0);
71 ck_assert_int_eq(data.event3, 0);
69 72
73 memset(&data, 0, sizeof(Test_Data));
74 efl_event_callback_call(obj, EFL_TEST_EVENT_EVENT_TESTER, NULL);
70 ck_assert_int_ne(data.event1, 0); 75 ck_assert_int_ne(data.event1, 0);
71 ck_assert_int_ne(data.event2, 0); 76 ck_assert_int_ne(data.event2, 0);
72 ck_assert_int_ne(data.event3, 0); 77 ck_assert_int_ne(data.event3, 0);