summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-08-30 13:02:55 -0400
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-08-30 19:15:17 +0200
commitf6e2e03720918416c0570df8188c10add441f15f (patch)
tree434f40e795108f4a69e4f172563f7048ff3749f1 /src/tests
parent1ca07b72da944f834c7ea03744fc78a6cc0e644f (diff)
tests: use void cast with util callback
fixes a lot of compiler warnings Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D9802
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/elementary/spec/efl_test_multi_selectable.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/tests/elementary/spec/efl_test_multi_selectable.c b/src/tests/elementary/spec/efl_test_multi_selectable.c
index da36e5b8f2..6f3132721b 100644
--- a/src/tests/elementary/spec/efl_test_multi_selectable.c
+++ b/src/tests/elementary/spec/efl_test_multi_selectable.c
@@ -46,7 +46,7 @@ EFL_START_TEST(test_multi_select)
46 46
47 Eina_Array *arr_selected; 47 Eina_Array *arr_selected;
48 efl_ui_select_mode_set(widget, EFL_UI_SELECT_MODE_MULTI); 48 efl_ui_select_mode_set(widget, EFL_UI_SELECT_MODE_MULTI);
49 efl_event_callback_add(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, (Efl_Event_Cb) event_callback_single_call_int_data, &c); 49 efl_event_callback_add(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, (void*) event_callback_single_call_int_data, &c);
50 efl_event_callback_add(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, event_callback_that_quits_the_main_loop_when_called, NULL); 50 efl_event_callback_add(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, event_callback_that_quits_the_main_loop_when_called, NULL);
51 51
52 efl_ui_selectable_selected_set(efl_pack_content_get(widget, 0), EINA_TRUE); 52 efl_ui_selectable_selected_set(efl_pack_content_get(widget, 0), EINA_TRUE);
@@ -69,7 +69,7 @@ EFL_START_TEST(test_multi_select)
69 efl_ui_selectable_selected_set(efl_pack_content_get(widget, 2), EINA_TRUE); 69 efl_ui_selectable_selected_set(efl_pack_content_get(widget, 2), EINA_TRUE);
70 ck_assert_int_eq(c, 0); 70 ck_assert_int_eq(c, 0);
71 71
72 efl_event_callback_del(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, (Efl_Event_Cb) event_callback_single_call_int_data, &c); 72 efl_event_callback_del(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, (void*) event_callback_single_call_int_data, &c);
73 efl_event_callback_del(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, event_callback_that_quits_the_main_loop_when_called, NULL); 73 efl_event_callback_del(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, event_callback_that_quits_the_main_loop_when_called, NULL);
74} 74}
75EFL_END_TEST 75EFL_END_TEST
@@ -79,7 +79,7 @@ EFL_START_TEST(test_multi_select_removal)
79 int c = 0; 79 int c = 0;
80 Eina_Array *arr_selected; 80 Eina_Array *arr_selected;
81 efl_ui_select_mode_set(widget, EFL_UI_SELECT_MODE_MULTI); 81 efl_ui_select_mode_set(widget, EFL_UI_SELECT_MODE_MULTI);
82 efl_event_callback_add(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, (Efl_Event_Cb) event_callback_single_call_int_data, &c); 82 efl_event_callback_add(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, (void*) event_callback_single_call_int_data, &c);
83 efl_event_callback_add(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, event_callback_that_quits_the_main_loop_when_called, NULL); 83 efl_event_callback_add(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, event_callback_that_quits_the_main_loop_when_called, NULL);
84 84
85 efl_ui_selectable_selected_set(efl_pack_content_get(widget, 0), EINA_TRUE); 85 efl_ui_selectable_selected_set(efl_pack_content_get(widget, 0), EINA_TRUE);
@@ -98,7 +98,7 @@ EFL_START_TEST(test_multi_select_removal)
98 ck_assert_ptr_eq(efl_ui_single_selectable_last_selected_get(widget), NULL); 98 ck_assert_ptr_eq(efl_ui_single_selectable_last_selected_get(widget), NULL);
99 _iterator_to_array(&arr_selected, efl_ui_selected_items_get(widget)); 99 _iterator_to_array(&arr_selected, efl_ui_selected_items_get(widget));
100 ck_assert_int_eq(eina_array_count(arr_selected), 0); 100 ck_assert_int_eq(eina_array_count(arr_selected), 0);
101 efl_event_callback_del(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, (Efl_Event_Cb) event_callback_single_call_int_data, &c); 101 efl_event_callback_del(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, (void*) event_callback_single_call_int_data, &c);
102 efl_event_callback_del(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, event_callback_that_quits_the_main_loop_when_called, NULL); 102 efl_event_callback_del(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, event_callback_that_quits_the_main_loop_when_called, NULL);
103} 103}
104EFL_END_TEST 104EFL_END_TEST
@@ -109,7 +109,7 @@ EFL_START_TEST(test_single_select)
109 Eina_Array *arr_selected; 109 Eina_Array *arr_selected;
110 110
111 efl_ui_select_mode_set(widget, EFL_UI_SELECT_MODE_SINGLE); 111 efl_ui_select_mode_set(widget, EFL_UI_SELECT_MODE_SINGLE);
112 efl_event_callback_add(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, (Efl_Event_Cb) event_callback_single_call_int_data, &c); 112 efl_event_callback_add(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, (void*) event_callback_single_call_int_data, &c);
113 efl_event_callback_add(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, event_callback_that_quits_the_main_loop_when_called, NULL); 113 efl_event_callback_add(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, event_callback_that_quits_the_main_loop_when_called, NULL);
114 114
115 efl_ui_selectable_selected_set(efl_pack_content_get(widget, 0), EINA_TRUE); 115 efl_ui_selectable_selected_set(efl_pack_content_get(widget, 0), EINA_TRUE);
@@ -130,7 +130,7 @@ EFL_START_TEST(test_single_select)
130 efl_ui_selectable_selected_set(efl_pack_content_get(widget, 2), EINA_TRUE); 130 efl_ui_selectable_selected_set(efl_pack_content_get(widget, 2), EINA_TRUE);
131 ck_assert_int_eq(c, 0); 131 ck_assert_int_eq(c, 0);
132 132
133 efl_event_callback_del(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, (Efl_Event_Cb) event_callback_single_call_int_data, &c); 133 efl_event_callback_del(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, (void*) event_callback_single_call_int_data, &c);
134 efl_event_callback_del(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, event_callback_that_quits_the_main_loop_when_called, NULL); 134 efl_event_callback_del(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, event_callback_that_quits_the_main_loop_when_called, NULL);
135} 135}
136EFL_END_TEST 136EFL_END_TEST
@@ -141,7 +141,7 @@ EFL_START_TEST(test_single_select_always)
141 Eina_Array *arr_selected; 141 Eina_Array *arr_selected;
142 142
143 efl_ui_select_mode_set(widget, EFL_UI_SELECT_MODE_SINGLE_ALWAYS); 143 efl_ui_select_mode_set(widget, EFL_UI_SELECT_MODE_SINGLE_ALWAYS);
144 efl_event_callback_add(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, (Efl_Event_Cb) event_callback_single_call_int_data, &c); 144 efl_event_callback_add(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, (void*) event_callback_single_call_int_data, &c);
145 efl_event_callback_add(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, event_callback_that_quits_the_main_loop_when_called, NULL); 145 efl_event_callback_add(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, event_callback_that_quits_the_main_loop_when_called, NULL);
146 146
147 efl_ui_selectable_selected_set(efl_pack_content_get(widget, 0), EINA_TRUE); 147 efl_ui_selectable_selected_set(efl_pack_content_get(widget, 0), EINA_TRUE);
@@ -162,7 +162,7 @@ EFL_START_TEST(test_single_select_always)
162 _iterator_to_array(&arr_selected, efl_ui_selected_items_get(widget)); 162 _iterator_to_array(&arr_selected, efl_ui_selected_items_get(widget));
163 ck_assert_int_eq(eina_array_count(arr_selected), 1); 163 ck_assert_int_eq(eina_array_count(arr_selected), 1);
164 ck_assert_ptr_eq(eina_array_data_get(arr_selected, 0), efl_pack_content_get(widget, 2)); 164 ck_assert_ptr_eq(eina_array_data_get(arr_selected, 0), efl_pack_content_get(widget, 2));
165 efl_event_callback_del(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, (Efl_Event_Cb) event_callback_single_call_int_data, &c); 165 efl_event_callback_del(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, (void*) event_callback_single_call_int_data, &c);
166 efl_event_callback_del(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, event_callback_that_quits_the_main_loop_when_called, NULL); 166 efl_event_callback_del(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, event_callback_that_quits_the_main_loop_when_called, NULL);
167} 167}
168EFL_END_TEST 168EFL_END_TEST