0009_input: add ecore_wl2_window_pointer_get TCs 88/313588/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Fri, 28 Jun 2024 06:38:29 +0000 (15:38 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Fri, 28 Jun 2024 06:38:31 +0000 (15:38 +0900)
[----------] 44 tests from etTestInput (154142 ms total)

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

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

index 1c1d919754f8414910f2d5a8d201e0f6332d6189..22ac72a4528e9dc9859ab6846712fcd9c5ab041b 100644 (file)
@@ -477,6 +477,32 @@ TEST_F(etTestInput, keyboard_get_negative)
    ASSERT_EQ(wl2_input, nullptr);
 }
 
+TEST_F(etTestInput, pointer_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_pointer_get(wlwin);
+   ASSERT_NE(wl2_input, nullptr);
+}
+
+TEST_F(etTestInput, pointer_get_negative)
+{
+   Ecore_Wl2_Input *wl2_input = NULL;
+
+   wl2_input = ecore_wl2_window_pointer_get(NULL);
+   ASSERT_EQ(wl2_input, nullptr);
+}
+
 TEST_F(etTestInput, pointer_down)
 {
    int ret = EFL_UTIL_ERROR_NONE;