summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Michael <cp.michael@samsung.com>2020-01-22 08:37:33 -0500
committerChristopher Michael <cp.michael@samsung.com>2020-01-22 08:37:33 -0500
commit55118cac119df8d2823c3f33e88fdc9bee9e6643 (patch)
tree5cab813a7a83ce073aa0b841ac89374ca8d80b17
parentbcff657ed7abfc5b246620cb0ef2c0b5874106c8 (diff)
tests/ecore_wl2: Add test for ecore_wl2_input_keyboard_repeat functions
ref T8016
-rw-r--r--src/tests/ecore_wl2/ecore_wl2_test_input.c31
1 files changed, 31 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 3c0330a3c8..2802ee6c00 100644
--- a/src/tests/ecore_wl2/ecore_wl2_test_input.c
+++ b/src/tests/ecore_wl2/ecore_wl2_test_input.c
@@ -197,6 +197,36 @@ EFL_START_TEST(wl2_input_pointer_xy)
197} 197}
198EFL_END_TEST 198EFL_END_TEST
199 199
200EFL_START_TEST(wl2_input_keyboard_repeat)
201{
202 Ecore_Wl2_Display *disp;
203 Ecore_Wl2_Input *input;
204 Eina_Iterator *itr;
205
206 disp = _display_connect();
207 ck_assert(disp != NULL);
208
209 itr = ecore_wl2_display_inputs_get(disp);
210 ck_assert(itr != NULL);
211
212 EINA_ITERATOR_FOREACH(itr, input)
213 {
214 if (ecore_wl2_input_seat_capabilities_get(input) ==
215 ECORE_WL2_SEAT_CAPABILITIES_KEYBOARD)
216 {
217 double rate = 0.0, delay = 0.0;
218
219 ecore_wl2_input_keyboard_repeat_set(input, 2.0, 2.0);
220 ecore_wl2_input_keyboard_repeat_get(input, &rate, &delay);
221 ck_assert_double_ne(rate, 2.0);
222 ck_assert_double_ne(delay, 2.0);
223 }
224 }
225
226 eina_iterator_free(itr);
227}
228EFL_END_TEST
229
200void 230void
201ecore_wl2_test_input(TCase *tc) 231ecore_wl2_test_input(TCase *tc)
202{ 232{
@@ -209,5 +239,6 @@ ecore_wl2_test_input(TCase *tc)
209 tcase_add_test(tc, wl2_input_name_get); 239 tcase_add_test(tc, wl2_input_name_get);
210 tcase_add_test(tc, wl2_input_seat_capabilities); 240 tcase_add_test(tc, wl2_input_seat_capabilities);
211 tcase_add_test(tc, wl2_input_pointer_xy); 241 tcase_add_test(tc, wl2_input_pointer_xy);
242 tcase_add_test(tc, wl2_input_keyboard_repeat);
212 } 243 }
213} 244}