0009_input: Add ecore_wl2_window_pointer_set() TCs 55/314155/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Mon, 8 Jul 2024 02:10:23 +0000 (11:10 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Mon, 8 Jul 2024 02:10:23 +0000 (11:10 +0900)
Change-Id: I19c9050ed14fb8c2a716b616a1850b5cfe69f1c8
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/testcase/0009_input.cpp

index 04217ceee168be98e7e3c208ee5a0dd851fa93d2..3e64ad691567967867ce6f4611e3cbb1ea02d2ea 100644 (file)
@@ -1251,6 +1251,38 @@ TEST_F(etTestInput, window_cursor_default_restore_null_window)
    ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE);
 }
 
+TEST_F(etTestInput, window_pointer_set)
+{
+   Ecore_Wl2_Window *wlwin = NULL;
+   Eina_Bool ret = EINA_TRUE; // intentional
+
+   etWin *tw = initNormalWin("TCWin_WindowPointerSet", 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);
+
+   // return void, so just for coverage and checking crash
+   ecore_wl2_window_pointer_set(wlwin, NULL, 0, 0);
+   ASSERT_TRUE(ret);
+
+   ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE);
+}
+
+TEST_F(etTestInput, window_pointer_set_null_window)
+{
+   Eina_Bool ret = EINA_TRUE; // intentional
+
+   // return void, so just for coverage and checking crash
+   ecore_wl2_window_pointer_set(NULL, NULL, 0, 0);
+   ASSERT_TRUE(ret);
+
+   ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE);
+}
+
 #ifndef DISABLE_GESTURE_TESTS
 TEST_F(etTestInput, gesture_tap22)
 {