efl_ui_collection_view: fix test
authorMarcel Hollerbach <mail@marcel-hollerbach.de>
Fri, 10 Jan 2020 13:50:55 +0000 (14:50 +0100)
committerJongmin Lee <jm105.lee@samsung.com>
Sat, 11 Jan 2020 07:00:06 +0000 (16:00 +0900)
count_realize / unrealize are stacked, we should not leak a callback
that has a stack var as user_data.

src/tests/elementary/efl_ui_test_collection_view.c

index d064203..5471dea 100644 (file)
@@ -106,6 +106,8 @@ EFL_START_TEST(test_efl_ui_collection_view_basic)
    f = efl_model_children_slice_get(lv, 0, efl_model_children_count_get(lv));
    f = efl_future_then(lv, f, .success_type = EINA_VALUE_TYPE_ARRAY, .success = _children_get);
    ecore_main_loop_iterate();
+   efl_event_callback_del(lv, EFL_UI_COLLECTION_VIEW_EVENT_ITEM_REALIZED, (void*)event_callback_that_increments_an_int_when_called, &count_realize);
+   efl_event_callback_del(lv, EFL_UI_COLLECTION_VIEW_EVENT_ITEM_UNREALIZED, (void*)event_callback_that_increments_an_int_when_called, &count_unrealize);
 }
 EFL_END_TEST