tests/ecore_wl2: Add test for ecore_wl2_input_keyboard_repeat functions

ref T8016
This commit is contained in:
Christopher Michael 2020-01-22 08:37:33 -05:00
parent bcff657ed7
commit 55118cac11
1 changed files with 31 additions and 0 deletions

View File

@ -197,6 +197,36 @@ EFL_START_TEST(wl2_input_pointer_xy)
}
EFL_END_TEST
EFL_START_TEST(wl2_input_keyboard_repeat)
{
Ecore_Wl2_Display *disp;
Ecore_Wl2_Input *input;
Eina_Iterator *itr;
disp = _display_connect();
ck_assert(disp != NULL);
itr = ecore_wl2_display_inputs_get(disp);
ck_assert(itr != NULL);
EINA_ITERATOR_FOREACH(itr, input)
{
if (ecore_wl2_input_seat_capabilities_get(input) ==
ECORE_WL2_SEAT_CAPABILITIES_KEYBOARD)
{
double rate = 0.0, delay = 0.0;
ecore_wl2_input_keyboard_repeat_set(input, 2.0, 2.0);
ecore_wl2_input_keyboard_repeat_get(input, &rate, &delay);
ck_assert_double_ne(rate, 2.0);
ck_assert_double_ne(delay, 2.0);
}
}
eina_iterator_free(itr);
}
EFL_END_TEST
void
ecore_wl2_test_input(TCase *tc)
{
@ -209,5 +239,6 @@ ecore_wl2_test_input(TCase *tc)
tcase_add_test(tc, wl2_input_name_get);
tcase_add_test(tc, wl2_input_seat_capabilities);
tcase_add_test(tc, wl2_input_pointer_xy);
tcase_add_test(tc, wl2_input_keyboard_repeat);
}
}