summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Michael <cp.michael@samsung.com>2020-01-15 11:05:22 -0500
committerChristopher Michael <cp.michael@samsung.com>2020-01-15 11:05:22 -0500
commite2ba3328666c55a7cd35b46ac7595fbe6af2e487 (patch)
tree3eed3a9a4ac529d1cc3151e1d63d55cffab64cc5
parent4c232f12d7187e8837b9cd0cf428597639f03f4a (diff)
tests/ecore_wl2: Add test for ecore_wl2_input_pointer_xy_get function
ref T8016
-rw-r--r--src/tests/ecore_wl2/ecore_wl2_test_input.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/tests/ecore_wl2/ecore_wl2_test_input.c b/src/tests/ecore_wl2/ecore_wl2_test_input.c
index db6cbf3ea5..92ab2ca830 100644
--- a/src/tests/ecore_wl2/ecore_wl2_test_input.c
+++ b/src/tests/ecore_wl2/ecore_wl2_test_input.c
@@ -148,6 +148,35 @@ EFL_START_TEST(wl2_input_seat_capabilities)
148} 148}
149EFL_END_TEST 149EFL_END_TEST
150 150
151EFL_START_TEST(wl2_input_pointer_xy)
152{
153 Ecore_Wl2_Display *disp;
154 Ecore_Wl2_Input *input;
155 Eina_Iterator *itr;
156
157 disp = _display_connect();
158 ck_assert(disp != NULL);
159
160 itr = ecore_wl2_display_inputs_get(disp);
161 ck_assert(itr != NULL);
162
163 EINA_ITERATOR_FOREACH(itr, input)
164 {
165 if (ecore_wl2_input_seat_capabilities_get(input) ==
166 ECORE_WL2_SEAT_CAPABILITIES_POINTER)
167 {
168 int x = 0, y = 0;
169
170 ecore_wl2_input_pointer_xy_get(input, &x, &y);
171 ck_assert_int_ne(x, 0);
172 ck_assert_int_ne(y, 0);
173 }
174 }
175
176 eina_iterator_free(itr);
177}
178EFL_END_TEST
179
151void 180void
152ecore_wl2_test_input(TCase *tc) 181ecore_wl2_test_input(TCase *tc)
153{ 182{
@@ -159,5 +188,6 @@ ecore_wl2_test_input(TCase *tc)
159 tcase_add_test(tc, wl2_input_keymap_get); 188 tcase_add_test(tc, wl2_input_keymap_get);
160 tcase_add_test(tc, wl2_input_name_get); 189 tcase_add_test(tc, wl2_input_name_get);
161 tcase_add_test(tc, wl2_input_seat_capabilities); 190 tcase_add_test(tc, wl2_input_seat_capabilities);
191 tcase_add_test(tc, wl2_input_pointer_xy);
162 } 192 }
163} 193}