summaryrefslogtreecommitdiff
path: root/src/tests/eo
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-03-02 19:13:44 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-03-03 13:40:33 +0900
commit4a97c7d387baecff848c18f2c90b52962ec882d9 (patch)
treebaceee265baff52fe2bfcbd0ed57e6ca2523c415 /src/tests/eo
parent6f31f36aa81cd15c34b9e55f43231e521acd35e0 (diff)
tests - eo - found eo_signals test is wrong... amazing it passed before
so it was listening for cb adds and dels... and or del of any cb except the cb add/del catcher was done.. it would fail... but ... the test actually added other cbs than this ... like: efl_event_callback_array_priority_add(obj, _eo_signals_callbacks(), -100, (void *) 1); a while array of cb's: { EV_A_CHANGED, _eo_signals_a_changed_cb }, { EV_A_CHANGED, _eo_signals_a_changed_cb2 }, { EV_A_CHANGED, _eo_signals_a_changed_never }, { EFL_EVENT_DEL, _eo_signals_efl_del_cb }); none of which were _eo_signals_cb_added_deled. i am amazed it passed before... now switch its checks to check for itself and then check for anything BUT itself...
Diffstat (limited to 'src/tests/eo')
-rw-r--r--src/tests/eo/suite/eo_test_general.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tests/eo/suite/eo_test_general.c b/src/tests/eo/suite/eo_test_general.c
index 18684f1ad2..a1e054c6ab 100644
--- a/src/tests/eo/suite/eo_test_general.c
+++ b/src/tests/eo/suite/eo_test_general.c
@@ -178,12 +178,17 @@ _eo_signals_efl_del_cb(void *_data EINA_UNUSED, const Efl_Event *event EINA_UNUS
178 _eo_signals_cb_flag |= 0x4; 178 _eo_signals_cb_flag |= 0x4;
179} 179}
180 180
181static check_is_deled = 0;
182
181void 183void
182_eo_signals_cb_added_deled(void *data, const Efl_Event *event) 184_eo_signals_cb_added_deled(void *data, const Efl_Event *event)
183{ 185{
184 const Efl_Callback_Array_Item_Full *callback_array = event->info; 186 const Efl_Callback_Array_Item_Full *callback_array = event->info;
185 187
186 fail_if(callback_array->func != _eo_signals_cb_added_deled); 188 if (check_is_deled)
189 fail_if(callback_array->func == _eo_signals_cb_added_deled);
190 else
191 fail_if(callback_array->func != _eo_signals_cb_added_deled);
187} 192}
188 193
189EFL_CALLBACKS_ARRAY_DEFINE(_eo_signals_callbacks, 194EFL_CALLBACKS_ARRAY_DEFINE(_eo_signals_callbacks,
@@ -202,6 +207,7 @@ START_TEST(eo_signals)
202 efl_event_callback_add(obj, EFL_EVENT_CALLBACK_ADD, _eo_signals_cb_added_deled, &_eo_signals_callbacks); 207 efl_event_callback_add(obj, EFL_EVENT_CALLBACK_ADD, _eo_signals_cb_added_deled, &_eo_signals_callbacks);
203 r = efl_event_callback_add(obj, EFL_EVENT_CALLBACK_DEL, _eo_signals_cb_added_deled, &_eo_signals_callbacks); 208 r = efl_event_callback_add(obj, EFL_EVENT_CALLBACK_DEL, _eo_signals_cb_added_deled, &_eo_signals_callbacks);
204 fail_if(!r); 209 fail_if(!r);
210 check_is_deled = 1;
205 efl_event_callback_array_priority_add(obj, _eo_signals_callbacks(), -100, (void *) 1); 211 efl_event_callback_array_priority_add(obj, _eo_signals_callbacks(), -100, (void *) 1);
206 efl_event_callback_array_add(obj, _eo_signals_callbacks(), (void *) 3); 212 efl_event_callback_array_add(obj, _eo_signals_callbacks(), (void *) 3);
207 r = efl_event_callback_array_priority_add(obj, _eo_signals_callbacks(), -50, (void *) 2); 213 r = efl_event_callback_array_priority_add(obj, _eo_signals_callbacks(), -50, (void *) 2);