diff options
author | Tom Hacohen <tom@stosb.com> | 2013-04-12 13:46:30 +0100 |
---|---|---|
committer | Tom Hacohen <tom@stosb.com> | 2013-04-12 13:49:26 +0100 |
commit | 0ed15b04f8dc6aac3a13a3fd2b1703b1acaf3427 (patch) | |
tree | c66ed2524c35b74277408d0ba97c1b2d73766d04 | |
parent | 9b0e7626f40b56d33af233053a6a3bb3dcf5bb70 (diff) | |
download | efl-0ed15b04f8dc6aac3a13a3fd2b1703b1acaf3427.tar.gz |
Eo array: Add more testing.
-rw-r--r-- | src/tests/eo/suite/eo_test_general.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/tests/eo/suite/eo_test_general.c b/src/tests/eo/suite/eo_test_general.c index 01ae11caab..f3d088872b 100644 --- a/src/tests/eo/suite/eo_test_general.c +++ b/src/tests/eo/suite/eo_test_general.c @@ -41,6 +41,14 @@ static Eina_Bool _eo_signals_a_changed_cb2(void *_data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) { _eo_signals_cb_flag |= 0x2; + return EO_CALLBACK_STOP; +} + +static Eina_Bool +_eo_signals_a_changed_never(void *_data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) +{ + /* This one should never be called. */ + fail_if(1); return EO_CALLBACK_CONTINUE; } @@ -68,6 +76,7 @@ START_TEST(eo_signals) static const Eo_Callback_Array_Item callbacks[] = { { EV_A_CHANGED, _eo_signals_a_changed_cb }, { EV_A_CHANGED, _eo_signals_a_changed_cb2 }, + { EV_A_CHANGED, _eo_signals_a_changed_never }, { EO_EV_DEL, _eo_signals_eo_del_cb }, { NULL, NULL } }; @@ -84,6 +93,8 @@ START_TEST(eo_signals) 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)); + /* Try to delete something that doesn't exist. */ + eo_do(obj, eo_event_callback_array_del(callbacks, (void *) 4)); _eo_signals_cb_flag = 0; fail_if(!eo_do(obj, simple_a_set(1))); ck_assert_int_eq(_eo_signals_cb_flag, 0x0); |