aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2016-02-05 06:21:56 +0100
committerCedric BAIL <cedric@osg.samsung.com>2016-02-05 06:21:56 +0100
commitd576c4f3e85aebe711d08df1ae3d03c29d9bda18 (patch)
treebb10ff93c15159d0e99f26baf51e89be9100b085
parentecore_evas: refactorize code and make sub ecore evas exploration recusrive. (diff)
downloadefl-d576c4f3e85aebe711d08df1ae3d03c29d9bda18.tar.gz
eo: tests callback add and del return value.
-rw-r--r--src/tests/eo/suite/eo_test_general.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/tests/eo/suite/eo_test_general.c b/src/tests/eo/suite/eo_test_general.c
index f3050270b2..584826db57 100644
--- a/src/tests/eo/suite/eo_test_general.c
+++ b/src/tests/eo/suite/eo_test_general.c
@@ -100,20 +100,25 @@ START_TEST(eo_signals)
{ NULL, NULL }
};
Eo *obj = eo_add(SIMPLE_CLASS, NULL);
+ Eina_Bool r;
eo_do(obj, eo_event_callback_add(EO_BASE_EVENT_CALLBACK_ADD, _eo_signals_cb_added_deled, callbacks));
- eo_do(obj, eo_event_callback_add(EO_BASE_EVENT_CALLBACK_DEL, _eo_signals_cb_added_deled, callbacks));
+ eo_do(obj, r = eo_event_callback_add(EO_BASE_EVENT_CALLBACK_DEL, _eo_signals_cb_added_deled, callbacks));
+ fail_if(!r);
eo_do(obj, eo_event_callback_array_priority_add(callbacks, -100, (void *) 1));
eo_do(obj, eo_event_callback_array_add(callbacks, (void *) 3));
- eo_do(obj, eo_event_callback_array_priority_add(callbacks, -50, (void *) 2));
+ eo_do(obj, r = eo_event_callback_array_priority_add(callbacks, -50, (void *) 2));
+ fail_if(!r);
eo_do(obj, simple_a_set(1));
ck_assert_int_eq(_eo_signals_cb_flag, 0x3);
eo_do(obj, eo_event_callback_array_del(callbacks, (void *) 1));
eo_do(obj, eo_event_callback_array_del(callbacks, (void *) 2));
- eo_do(obj, eo_event_callback_array_del(callbacks, (void *) 3));
+ eo_do(obj, r = eo_event_callback_array_del(callbacks, (void *) 3));
+ fail_if(!r);
/* Try to delete something that doesn't exist. */
- eo_do(obj, eo_event_callback_array_del(callbacks, (void *) 4));
+ eo_do(obj, r = eo_event_callback_array_del(callbacks, (void *) 4));
+ fail_if(r);
_eo_signals_cb_flag = 0;
eo_do(obj, simple_a_set(1));
ck_assert_int_eq(_eo_signals_cb_flag, 0x0);
@@ -141,7 +146,8 @@ START_TEST(eo_signals)
ck_assert_int_eq(_eo_signals_cb_flag, 0x3);
/* We don't need this one anymore. */
- eo_do(obj, eo_event_callback_del(EV_A_CHANGED2, _eo_signals_a_changed_never, (void *) 1));
+ eo_do(obj, r = eo_event_callback_del(EV_A_CHANGED2, _eo_signals_a_changed_never, (void *) 1));
+ fail_if(!r);
/* Call legacy event with legacy and non-legacy callbacks. */
int a = 3;