tests/ecore_wl2: Add test for ecore_wl2_window_geometry functions
authorChristopher Michael <cp.michael@samsung.com>
Tue, 19 Nov 2019 13:37:29 +0000 (08:37 -0500)
committerJongmin Lee <jm105.lee@samsung.com>
Tue, 19 Nov 2019 21:28:19 +0000 (06:28 +0900)
ref T8016

src/tests/ecore_wl2/ecore_wl2_test_window.c

index a3e1cbe..e68d8c1 100644 (file)
@@ -287,6 +287,29 @@ EFL_START_TEST(wl2_wm_window_rotation_app)
 }
 EFL_END_TEST
 
+EFL_START_TEST(wl2_window_geometry)
+{
+   Ecore_Wl2_Display *disp;
+   Ecore_Wl2_Window *win;
+   int x, y, w, h;
+
+   disp = _display_connect();
+   ck_assert(disp != NULL);
+
+   win = _window_create(disp);
+   ck_assert(win != NULL);
+
+   ecore_wl2_window_geometry_set(win, 10, 10, 100, 100);
+
+   ecore_wl2_window_geometry_get(win, &x, &y, &w, &h);
+
+   fail_if(x != 10);
+   fail_if(y != 10);
+   fail_if(w != 100);
+   fail_if(h != 100);
+}
+EFL_END_TEST
+
 void
 ecore_wl2_test_window(TCase *tc)
 {
@@ -308,5 +331,6 @@ ecore_wl2_test_window(TCase *tc)
         tcase_add_test(tc, wl2_window_preferred_rot);
         tcase_add_test(tc, wl2_window_rotation_app);
         tcase_add_test(tc, wl2_wm_window_rotation_app);
+        tcase_add_test(tc, wl2_window_geometry);
      }
 }