0009_input: add ecore_wl2_window_keyboard_get() TCs 85/313585/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Fri, 28 Jun 2024 06:29:14 +0000 (15:29 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Fri, 28 Jun 2024 06:29:17 +0000 (15:29 +0900)
[----------] 42 tests from etTestInput (153374 ms total)

[----------] Global test environment tear-down
[==========] 42 tests from 1 test suite ran. (153374 ms total)
[  PASSED  ] 42 tests.

Change-Id: If14b44b73aa0f716b7a1d9014f7524bdde8366d2
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/testcase/0009_input.cpp

index 629a63432bccbf31e823b2a81523b4f3fb46cd65..1c1d919754f8414910f2d5a8d201e0f6332d6189 100644 (file)
@@ -451,6 +451,32 @@ TEST_F(etTestInput, input_keymap_get_negative)
    ASSERT_EQ(keymap, nullptr);
 }
 
+TEST_F(etTestInput, keyboard_get)
+{
+   Ecore_Wl2_Window *wlwin = NULL;
+   Ecore_Wl2_Input *wl2_input = NULL;
+
+   etWin *tw = initNormalWin("TCWin_KeyboardGet", EINA_FALSE);
+   ASSERT_TRUE(tw != NULL) << "failed to init window";
+
+   showTCWin(tw);
+   ASSERT_VIS_ON(tw);
+
+   wlwin = (Ecore_Wl2_Window *)elm_win_wl_window_get(tw->elm_win);
+   EINA_SAFETY_ON_NULL_RETURN(wlwin);
+
+   wl2_input = ecore_wl2_window_keyboard_get(wlwin);
+   ASSERT_NE(wl2_input, nullptr);
+}
+
+TEST_F(etTestInput, keyboard_get_negative)
+{
+   Ecore_Wl2_Input *wl2_input = NULL;
+
+   wl2_input = ecore_wl2_window_keyboard_get(NULL);
+   ASSERT_EQ(wl2_input, nullptr);
+}
+
 TEST_F(etTestInput, pointer_down)
 {
    int ret = EFL_UTIL_ERROR_NONE;