summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWoochanlee <wc0917.lee@samsung.com>2019-12-02 08:51:49 -0500
committerChristopher Michael <cp.michael@samsung.com>2019-12-02 08:53:47 -0500
commit12cb64cfadb7e1643f887bf0c0c32c9d47cd27df (patch)
tree7b53b3bc3fb1a455ef12abfb443dbeff2bd44a9a
parent6162914be59354a5113f9b6d81a9c0f51fe8a1c5 (diff)
tests/ecore_wl2: Add test for ecore_wl2_window_aspect functions
Summary: tests/ecore_wl2: Add test for ecore_wl2_window_aspect functions ref T8016 ref D10743 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8016 Differential Revision: https://phab.enlightenment.org/D10747
-rw-r--r--src/tests/ecore_wl2/ecore_wl2_test_window.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/tests/ecore_wl2/ecore_wl2_test_window.c b/src/tests/ecore_wl2/ecore_wl2_test_window.c
index e7d207639f..4641716a31 100644
--- a/src/tests/ecore_wl2/ecore_wl2_test_window.c
+++ b/src/tests/ecore_wl2/ecore_wl2_test_window.c
@@ -335,15 +335,31 @@ EFL_START_TEST(wl2_window_activated)
335 Ecore_Wl2_Window *win; 335 Ecore_Wl2_Window *win;
336 Eina_Bool ret; 336 Eina_Bool ret;
337 337
338 ret = ecore_wl2_window_activated_get(win);
339
340 fail_if(ret != EINA_TRUE);
341}
342EFL_END_TEST
343
344EFL_START_TEST(wl2_window_aspect)
345{
346 Ecore_Wl2_Display *disp;
347 Ecore_Wl2_Window *win;
348 int w, h;
349 unsigned int aspect;
350
338 disp = _display_connect(); 351 disp = _display_connect();
339 ck_assert(disp != NULL); 352 ck_assert(disp != NULL);
340 353
341 win = _window_create(disp); 354 win = _window_create(disp);
342 ck_assert(win != NULL); 355 ck_assert(win != NULL);
343 356
344 ret = ecore_wl2_window_activated_get(win); 357 ecore_wl2_window_aspect_set(win, 1, 1, 3);
358 ecore_wl2_window_aspect_get(win, &w, &h, &aspect);
345 359
346 fail_if(ret != EINA_TRUE); 360 fail_if(w != 1);
361 fail_if(h != 1);
362 fail_if(aspect != 3);
347} 363}
348EFL_END_TEST 364EFL_END_TEST
349 365
@@ -362,7 +378,6 @@ EFL_START_TEST(wl2_window_available_rotation)
362 win = _window_create(disp); 378 win = _window_create(disp);
363 ck_assert(win != NULL); 379 ck_assert(win != NULL);
364 380
365
366 ecore_wl2_window_available_rotations_set(win, rots, 2); 381 ecore_wl2_window_available_rotations_set(win, rots, 2);
367 382
368 ret = ecore_wl2_window_available_rotations_get(win, &ret_rots, &ret_count); 383 ret = ecore_wl2_window_available_rotations_get(win, &ret_rots, &ret_count);
@@ -399,5 +414,6 @@ ecore_wl2_test_window(TCase *tc)
399 tcase_add_test(tc, wl2_window_type); 414 tcase_add_test(tc, wl2_window_type);
400 tcase_add_test(tc, wl2_window_activated); 415 tcase_add_test(tc, wl2_window_activated);
401 tcase_add_test(tc, wl2_window_available_rotation); 416 tcase_add_test(tc, wl2_window_available_rotation);
417 tcase_add_test(tc, wl2_window_aspect);
402 } 418 }
403} 419}