summaryrefslogtreecommitdiff
path: root/src/tests/elementary/spec/efl_test_multi_selectable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/elementary/spec/efl_test_multi_selectable.c')
-rw-r--r--src/tests/elementary/spec/efl_test_multi_selectable.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/tests/elementary/spec/efl_test_multi_selectable.c b/src/tests/elementary/spec/efl_test_multi_selectable.c
index 6f31327..770c10e 100644
--- a/src/tests/elementary/spec/efl_test_multi_selectable.c
+++ b/src/tests/elementary/spec/efl_test_multi_selectable.c
@@ -135,38 +135,6 @@ EFL_START_TEST(test_single_select)
135} 135}
136EFL_END_TEST 136EFL_END_TEST
137 137
138EFL_START_TEST(test_single_select_always)
139{
140 int c = 0;
141 Eina_Array *arr_selected;
142
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, (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);
146
147 efl_ui_selectable_selected_set(efl_pack_content_get(widget, 0), EINA_TRUE);
148 if (c == 0) efl_loop_begin(efl_main_loop_get());
149 ck_assert_int_eq(c, 1);
150 c = 0;
151 efl_ui_selectable_selected_set(efl_pack_content_get(widget, 2), EINA_TRUE);
152 if (c == 0) efl_loop_begin(efl_main_loop_get());
153 ck_assert_int_eq(c, 1);
154 c = 0;
155 efl_ui_selectable_selected_set(efl_pack_content_get(widget, 2), EINA_TRUE);
156 if (c == 0) efl_loop_begin(efl_main_loop_get());
157 ck_assert_int_eq(c, 1);
158 c = 0;
159 ck_assert_int_eq(efl_ui_selectable_selected_get(efl_pack_content_get(widget, 0)), EINA_FALSE);
160 ck_assert_int_eq(efl_ui_selectable_selected_get(efl_pack_content_get(widget, 2)), EINA_TRUE);
161 ck_assert_ptr_eq(efl_ui_single_selectable_last_selected_get(widget), efl_pack_content_get(widget, 2));
162 _iterator_to_array(&arr_selected, efl_ui_selected_items_get(widget));
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));
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);
167}
168EFL_END_TEST
169
170EFL_START_TEST(test_none_select) 138EFL_START_TEST(test_none_select)
171{ 139{
172 Efl_Ui_Item *selected = NULL; 140 Efl_Ui_Item *selected = NULL;
@@ -290,7 +258,6 @@ efl_ui_multi_selectable_behavior_test(TCase *tc)
290 tcase_add_test(tc, test_multi_select_removal); 258 tcase_add_test(tc, test_multi_select_removal);
291 tcase_add_test(tc, test_single_select); 259 tcase_add_test(tc, test_single_select);
292 tcase_add_test(tc, test_none_select); 260 tcase_add_test(tc, test_none_select);
293 tcase_add_test(tc, test_single_select_always);
294 tcase_add_test(tc, select_all_api); 261 tcase_add_test(tc, select_all_api);
295 tcase_add_test(tc, unselect_all_api); 262 tcase_add_test(tc, unselect_all_api);
296 tcase_add_test(tc, unselect_range); 263 tcase_add_test(tc, unselect_range);