tests/ecore_wl2: Add test for ecore_wl2_input_name_get
authorChristopher Michael <cp.michael@samsung.com>
Thu, 1 Aug 2019 13:04:09 +0000 (09:04 -0400)
committerWooHyun Jung <wh0705.jung@samsung.com>
Mon, 5 Aug 2019 02:20:00 +0000 (11:20 +0900)
ref T8016

src/tests/ecore_wl2/ecore_wl2_test_input.c

index fd422e0..73056a7 100644 (file)
@@ -109,6 +109,27 @@ EFL_START_TEST(wl2_input_keymap_get)
 }
 EFL_END_TEST
 
+EFL_START_TEST(wl2_input_name_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)
+     {
+        printf("Input: <%s>\n", ecore_wl2_input_name_get(input));
+     }
+
+   eina_iterator_free(itr);
+}
+EFL_END_TEST
+
 void
 ecore_wl2_test_input(TCase *tc)
 {
@@ -118,5 +139,6 @@ ecore_wl2_test_input(TCase *tc)
         tcase_add_test(tc, wl2_input_seat_id_get);
         tcase_add_test(tc, wl2_input_display_get);
         tcase_add_test(tc, wl2_input_keymap_get);
+        tcase_add_test(tc, wl2_input_name_get);
      }
 }