From 8257a916f4767f14ca5a52d4f8fe6f176923e405 Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Thu, 1 Aug 2019 08:53:45 -0400 Subject: [PATCH] tests/ecore_wl2: Add test for ecore_wl2_input_seat_id_get function ref T8016 --- src/tests/ecore_wl2/ecore_wl2_test_input.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/tests/ecore_wl2/ecore_wl2_test_input.c b/src/tests/ecore_wl2/ecore_wl2_test_input.c index 074455a..814fa80 100644 --- a/src/tests/ecore_wl2/ecore_wl2_test_input.c +++ b/src/tests/ecore_wl2/ecore_wl2_test_input.c @@ -43,11 +43,36 @@ EFL_START_TEST(wl2_input_seat_get) } EFL_END_TEST +EFL_START_TEST(wl2_input_seat_id_get) +{ + 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) + { + int id; + + id = ecore_wl2_input_seat_id_get(input); + ck_assert_int_ne(id, 0); + } + + eina_iterator_free(itr); +} +EFL_END_TEST + void ecore_wl2_test_input(TCase *tc) { if (getenv("WAYLAND_DISPLAY")) { tcase_add_test(tc, wl2_input_seat_get); + tcase_add_test(tc, wl2_input_seat_id_get); } } -- 2.7.4