utc_ecore_wl2_window_video_surface_sync_set.c
utc_ecore_wl2_window_video_surface_destination_set.c
utc_ecore_wl2_window_render_sync_fd_create.c
-
-
+utc_ecore_wl2_subsurface_del.c
+utc_ecore_wl2_subsurface_native_surface_get.c
+utc_ecore_wl2_subsurface_new.c
+utc_ecore_wl2_subsurface_place_surface_above.c
+utc_ecore_wl2_subsurface_place_surface_below.c
+utc_ecore_wl2_subsurface_sync_set.c
+utc_ecore_wl2_subsurface_video_surface_destination_set.c
+utc_ecore_wl2_subsurface_video_surface_prepare.c
utc_ecore_wl2_window_video_surface_sync_set.c
utc_ecore_wl2_window_video_surface_destination_set.c
#utc_ecore_wl2_window_render_sync_fd_create.c
+utc_ecore_wl2_subsurface_del.c
+utc_ecore_wl2_subsurface_native_surface_get.c
+utc_ecore_wl2_subsurface_new.c
+utc_ecore_wl2_subsurface_place_surface_above.c
+utc_ecore_wl2_subsurface_place_surface_below.c
+utc_ecore_wl2_subsurface_sync_set.c
+utc_ecore_wl2_subsurface_video_surface_destination_set.c
+utc_ecore_wl2_subsurface_video_surface_prepare.c
utc_ecore_wl2_window_video_surface_sync_set.c
utc_ecore_wl2_window_video_surface_destination_set.c
utc_ecore_wl2_window_render_sync_fd_create.c
+utc_ecore_wl2_subsurface_del.c
+utc_ecore_wl2_subsurface_native_surface_get.c
+utc_ecore_wl2_subsurface_new.c
+utc_ecore_wl2_subsurface_place_surface_above.c
+utc_ecore_wl2_subsurface_place_surface_below.c
+utc_ecore_wl2_subsurface_sync_set.c
+utc_ecore_wl2_subsurface_video_surface_destination_set.c
+utc_ecore_wl2_subsurface_video_surface_prepare.c
utc_ecore_wl2_window_video_surface_sync_set.c
utc_ecore_wl2_window_video_surface_destination_set.c
utc_ecore_wl2_window_render_sync_fd_create.c
+utc_ecore_wl2_subsurface_del.c
+utc_ecore_wl2_subsurface_native_surface_get.c
+utc_ecore_wl2_subsurface_new.c
+utc_ecore_wl2_subsurface_place_surface_above.c
+utc_ecore_wl2_subsurface_place_surface_below.c
+utc_ecore_wl2_subsurface_sync_set.c
+utc_ecore_wl2_subsurface_video_surface_destination_set.c
+utc_ecore_wl2_subsurface_video_surface_prepare.c
utc_ecore_wl2_window_video_surface_sync_set.c
utc_ecore_wl2_window_video_surface_destination_set.c
utc_ecore_wl2_window_render_sync_fd_create.c
+utc_ecore_wl2_subsurface_del.c
+utc_ecore_wl2_subsurface_native_surface_get.c
+utc_ecore_wl2_subsurface_new.c
+utc_ecore_wl2_subsurface_place_surface_above.c
+utc_ecore_wl2_subsurface_place_surface_below.c
+utc_ecore_wl2_subsurface_sync_set.c
+utc_ecore_wl2_subsurface_video_surface_destination_set.c
+utc_ecore_wl2_subsurface_video_surface_prepare.c
--- /dev/null
+#include <check.h>
+#include <Eina.h>
+#include <Ecore.h>
+#include <Ecore_Wl2.h>
+
+static Eina_Bool startup_status = EINA_FALSE;
+static Ecore_Timer *timer_exit = NULL;
+
+/**
+ * @addtogroup ecore_wl2
+ * @{
+ * @defgroup ecore_wl2_subsurface_del ecore_wl2_subsurface_del()
+ *
+ * @precondition
+ * @step 1 Initialize Ecore_Wl2 with ecore_wl2_init()
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ if (ecore_wl2_init())
+ {
+ startup_status = EINA_TRUE;
+ }
+}
+
+static void
+teardown(void)
+{
+ ecore_wl2_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool _timer_cb(void *data)
+{
+ Ecore_Wl2_Subsurface *ss;
+ Ecore_Wl2_Display *ewd = NULL;
+ //Connect the display.
+ ewd = ecore_wl2_display_connect(NULL);
+ if (!ewd)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+ Ecore_Wl2_Window *win = NULL;
+ win = ecore_wl2_window_new(ewd, NULL, 0, 0, 1, 1);
+ if (!win)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+ ss = ecore_wl2_subsurface_new(win);
+ if (!ss)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+ ecore_wl2_subsurface_del(ss);
+
+quit_main_loop:
+ ecore_main_loop_quit();
+
+ return ECORE_CALLBACK_DONE;
+}
+
+/**
+ * @addtogroup ecore_wl2_subsurface_del
+ * @{
+ * @objective Positive test case checks that the tested function calling without any errors.
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call tested function.
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_del_p)
+{
+ if (startup_status != EINA_TRUE)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+ return;
+ }
+
+ timer_exit = ecore_timer_add(0.2, _timer_cb, NULL);
+ if (!timer_exit)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ ecore_main_loop_begin();
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup ecore_wl2_subsurface_del
+ * @{
+ * @objective Negative test case checks if function call with invalid value works without segmentation fault
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call ecore_wl2_subsurface_del with invalid value instead of the Ecore_Wl2_Subsurface object
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_del_n)
+{
+ if (startup_status != EINA_TRUE)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+ return;
+ }
+
+ ecore_wl2_subsurface_del(NULL);
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_ecore_wl2_subsurface_del()
+{
+ TCase *tcase = tcase_create("utc_ecore_wl2_subsurface_del");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_ecore_wl2_subsurface_del_p);
+ tcase_add_test(tcase, utc_ecore_wl2_subsurface_del_n);
+ return tcase;
+}
--- /dev/null
+#include <check.h>
+#include <Eina.h>
+#include <Ecore.h>
+#include <Ecore_Wl2.h>
+
+static Eina_Bool startup_status = EINA_FALSE;
+static Ecore_Timer *timer_exit = NULL;
+
+/**
+ * @addtogroup ecore_wl2
+ * @{
+ * @defgroup ecore_wl2_subsurface_native_surface_get ecore_wl2_subsurface_native_surface_get()
+ *
+ * @precondition
+ * @step 1 Initialize Ecore_Wl2 with ecore_wl2_init()
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ if (ecore_wl2_init())
+ {
+ startup_status = EINA_TRUE;
+ }
+}
+
+static void
+teardown(void)
+{
+ ecore_wl2_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool _timer_cb(void *data)
+{
+ Ecore_Wl2_Subsurface *ss;
+ void *surface;
+ Ecore_Wl2_Display *ewd = NULL;
+ //Connect the display.
+ ewd = ecore_wl2_display_connect(NULL);
+ if (!ewd)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+ Ecore_Wl2_Window *win = NULL;
+ win = ecore_wl2_window_new(ewd, NULL, 0, 0, 1, 1);
+ if (!win)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+ ss = ecore_wl2_subsurface_new(win);
+ if (!ss)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+ surface = ecore_wl2_subsurface_native_surface_get(ss);
+ if (!surface)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+quit_main_loop:
+ ecore_main_loop_quit();
+
+ return ECORE_CALLBACK_DONE;
+}
+
+/**
+ * @addtogroup ecore_wl2_subsurface_native_surface_get
+ * @{
+ * @objective Positive test case checks that the tested function calling without any errors.
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call tested function.
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_native_surface_get_p)
+{
+ if (startup_status != EINA_TRUE)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+ return;
+ }
+
+ timer_exit = ecore_timer_add(0.2, _timer_cb, NULL);
+ if (!timer_exit)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ ecore_main_loop_begin();
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup ecore_wl2_subsurface_native_surface_get
+ * @{
+ * @objective Negative test case checks if function call with invalid value works without segmentation fault
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call ecore_wl2_subsurface_native_surface_get with invalid value instead of the Ecore_Wl2_Subsurface object
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_native_surface_get_n)
+{
+ void *surface;
+ if (startup_status != EINA_TRUE)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+ return;
+ }
+
+ surface = ecore_wl2_subsurface_native_surface_get(NULL);
+
+ if (surface)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ return;
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_ecore_wl2_subsurface_native_surface_get()
+{
+ TCase *tcase = tcase_create("utc_ecore_wl2_subsurface_native_surface_get");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_ecore_wl2_subsurface_native_surface_get_p);
+ tcase_add_test(tcase, utc_ecore_wl2_subsurface_native_surface_get_n);
+ return tcase;
+}
--- /dev/null
+#include <check.h>
+#include <Eina.h>
+#include <Ecore.h>
+#include <Ecore_Wl2.h>
+
+static Eina_Bool startup_status = EINA_FALSE;
+static Ecore_Timer *timer_exit = NULL;
+
+/**
+ * @addtogroup ecore_wl2
+ * @{
+ * @defgroup ecore_wl2_subsurface_new ecore_wl2_subsurface_new()
+ *
+ * @precondition
+ * @step 1 Initialize Ecore_Wl2 with ecore_wl2_init()
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ if (ecore_wl2_init())
+ {
+ startup_status = EINA_TRUE;
+ }
+}
+
+static void
+teardown(void)
+{
+ ecore_wl2_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool _timer_cb(void *data)
+{
+ Ecore_Wl2_Subsurface *ss;
+ Ecore_Wl2_Display *ewd = NULL;
+ //Connect the display.
+ ewd = ecore_wl2_display_connect(NULL);
+ if (!ewd)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+ Ecore_Wl2_Window *win = NULL;
+ win = ecore_wl2_window_new(ewd, NULL, 0, 0, 1, 1);
+ if (!win)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+ ss = ecore_wl2_subsurface_new(win);
+ if (!ss)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+quit_main_loop:
+ ecore_main_loop_quit();
+
+ return ECORE_CALLBACK_DONE;
+}
+
+/**
+ * @addtogroup ecore_wl2_subsurface_new
+ * @{
+ * @objective Positive test case checks that the tested function calling without any errors.
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call tested function.
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_new_p)
+{
+ if (startup_status != EINA_TRUE)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+ return;
+ }
+
+ timer_exit = ecore_timer_add(0.2, _timer_cb, NULL);
+ if (!timer_exit)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ ecore_main_loop_begin();
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup ecore_wl2_subsurface_new
+ * @{
+ * @objective Negative test case checks if function call with invalid value works without segmentation fault
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call ecore_wl2_subsurface_new with invalid value instead of the window object
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_new_n)
+{
+ Ecore_Wl2_Subsurface *ret;
+ if (startup_status != EINA_TRUE)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+ return;
+ }
+
+ ret = ecore_wl2_subsurface_new(NULL);
+
+ if (ret)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ return;
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_ecore_wl2_subsurface_new()
+{
+ TCase *tcase = tcase_create("utc_ecore_wl2_subsurface_new");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_ecore_wl2_subsurface_new_p);
+ tcase_add_test(tcase, utc_ecore_wl2_subsurface_new_n);
+ return tcase;
+}
--- /dev/null
+#include <check.h>
+#include <Eina.h>
+#include <Ecore.h>
+#include <Ecore_Wl2.h>
+
+static Eina_Bool startup_status = EINA_FALSE;
+static Ecore_Timer *timer_exit = NULL;
+
+/**
+ * @addtogroup ecore_wl2
+ * @{
+ * @defgroup ecore_wl2_subsurface_place_surface_above ecore_wl2_subsurface_place_surface_above()
+ *
+ * @precondition
+ * @step 1 Initialize Ecore_Wl2 with ecore_wl2_init()
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ if (ecore_wl2_init())
+ {
+ startup_status = EINA_TRUE;
+ }
+}
+
+static void
+teardown(void)
+{
+ ecore_wl2_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool _timer_cb(void *data)
+{
+ Ecore_Wl2_Subsurface *ss, *other;
+ Ecore_Wl2_Display *ewd = NULL;
+ //Connect the display.
+ ewd = ecore_wl2_display_connect(NULL);
+ if (!ewd)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+ Ecore_Wl2_Window *win = NULL;
+ win = ecore_wl2_window_new(ewd, NULL, 0, 0, 1, 1);
+ if (!win)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+ ss = ecore_wl2_subsurface_new(win);
+ if (!ss)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+ other = ecore_wl2_subsurface_new(win);
+ if (!other)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+ ecore_wl2_subsurface_place_surface_above(ss, other);
+
+ /* try to set with same order */
+ ecore_wl2_subsurface_place_surface_above(ss, other);
+
+ ecore_wl2_subsurface_place_surface_above(other, ss);
+
+ /* try to set with same order */
+ ecore_wl2_subsurface_place_surface_above(other, ss);
+
+quit_main_loop:
+ ecore_main_loop_quit();
+
+ return ECORE_CALLBACK_DONE;
+}
+
+/**
+ * @addtogroup ecore_wl2_subsurface_place_surface_above
+ * @{
+ * @objective Positive test case checks that the tested function calling without any errors.
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call tested function.
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_place_surface_above_p)
+{
+ if (startup_status != EINA_TRUE)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+ return;
+ }
+
+ timer_exit = ecore_timer_add(0.2, _timer_cb, NULL);
+ if (!timer_exit)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ ecore_main_loop_begin();
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup ecore_wl2_subsurface_place_surface_above
+ * @{
+ * @objective Negative test case checks if function call with invalid value works without segmentation fault
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call ecore_wl2_subsurface_place_surface_above with invalid value instead of the Ecore_Wl2_Subsurface object
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_place_surface_above_n)
+{
+ if (startup_status != EINA_TRUE)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+ return;
+ }
+
+ ecore_wl2_subsurface_place_surface_above(NULL, NULL);
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_ecore_wl2_subsurface_place_surface_above()
+{
+ TCase *tcase = tcase_create("utc_ecore_wl2_subsurface_place_surface_above");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_ecore_wl2_subsurface_place_surface_above_p);
+ tcase_add_test(tcase, utc_ecore_wl2_subsurface_place_surface_above_n);
+ return tcase;
+}
--- /dev/null
+#include <check.h>
+#include <Eina.h>
+#include <Ecore.h>
+#include <Ecore_Wl2.h>
+
+static Eina_Bool startup_status = EINA_FALSE;
+static Ecore_Timer *timer_exit = NULL;
+
+/**
+ * @addtogroup ecore_wl2
+ * @{
+ * @defgroup ecore_wl2_subsurface_place_surface_below ecore_wl2_subsurface_place_surface_below()
+ *
+ * @precondition
+ * @step 1 Initialize Ecore_Wl2 with ecore_wl2_init()
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ if (ecore_wl2_init())
+ {
+ startup_status = EINA_TRUE;
+ }
+}
+
+static void
+teardown(void)
+{
+ ecore_wl2_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool _timer_cb(void *data)
+{
+ Ecore_Wl2_Subsurface *ss, *other;
+ Ecore_Wl2_Display *ewd = NULL;
+ //Connect the display.
+ ewd = ecore_wl2_display_connect(NULL);
+ if (!ewd)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+ Ecore_Wl2_Window *win = NULL;
+ win = ecore_wl2_window_new(ewd, NULL, 0, 0, 1, 1);
+ if (!win)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+ ss = ecore_wl2_subsurface_new(win);
+ if (!ss)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+ other = ecore_wl2_subsurface_new(win);
+ if (!other)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+ ecore_wl2_subsurface_place_surface_below(ss, other);
+
+ /* try to set with same order */
+ ecore_wl2_subsurface_place_surface_below(ss, other);
+
+ ecore_wl2_subsurface_place_surface_below(other, ss);
+
+ /* try to set with same order */
+ ecore_wl2_subsurface_place_surface_below(other, ss);
+
+quit_main_loop:
+ ecore_main_loop_quit();
+
+ return ECORE_CALLBACK_DONE;
+}
+
+/**
+ * @addtogroup ecore_wl2_subsurface_place_surface_below
+ * @{
+ * @objective Positive test case checks that the tested function calling without any errors.
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call tested function.
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_place_surface_below_p)
+{
+ if (startup_status != EINA_TRUE)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+ return;
+ }
+
+ timer_exit = ecore_timer_add(0.2, _timer_cb, NULL);
+ if (!timer_exit)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ ecore_main_loop_begin();
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup ecore_wl2_subsurface_place_surface_below
+ * @{
+ * @objective Negative test case checks if function call with invalid value works without segmentation fault
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call ecore_wl2_subsurface_place_surface_below with invalid value instead of the Ecore_Wl2_Subsurface object
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_place_surface_below_n)
+{
+ if (startup_status != EINA_TRUE)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+ return;
+ }
+
+ ecore_wl2_subsurface_place_surface_below(NULL, NULL);
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_ecore_wl2_subsurface_place_surface_below()
+{
+ TCase *tcase = tcase_create("utc_ecore_wl2_subsurface_place_surface_below");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_ecore_wl2_subsurface_place_surface_below_p);
+ tcase_add_test(tcase, utc_ecore_wl2_subsurface_place_surface_below_n);
+ return tcase;
+}
--- /dev/null
+#include <check.h>
+#include <Eina.h>
+#include <Ecore.h>
+#include <Ecore_Wl2.h>
+
+static Eina_Bool startup_status = EINA_FALSE;
+static Ecore_Timer *timer_exit = NULL;
+
+/**
+ * @addtogroup ecore_wl2
+ * @{
+ * @defgroup ecore_wl2_subsurface_sync_set ecore_wl2_subsurface_sync_set()
+ *
+ * @precondition
+ * @step 1 Initialize Ecore_Wl2 with ecore_wl2_init()
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ if (ecore_wl2_init())
+ {
+ startup_status = EINA_TRUE;
+ }
+}
+
+static void
+teardown(void)
+{
+ ecore_wl2_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool _timer_cb(void *data)
+{
+ Ecore_Wl2_Subsurface *ss;
+ Ecore_Wl2_Display *ewd = NULL;
+ //Connect the display.
+ ewd = ecore_wl2_display_connect(NULL);
+ if (!ewd)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+ Ecore_Wl2_Window *win = NULL;
+ win = ecore_wl2_window_new(ewd, NULL, 0, 0, 1, 1);
+ if (!win)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+ ss = ecore_wl2_subsurface_new(win);
+ if (!ss)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+ ecore_wl2_subsurface_sync_set(ss, EINA_TRUE);
+
+ /* try to set with same value EINA_TRUE */
+ ecore_wl2_subsurface_sync_set(ss, EINA_TRUE);
+
+ ecore_wl2_subsurface_sync_set(ss, EINA_FALSE);
+
+ /* try to set with same value EINA_FALSE */
+ ecore_wl2_subsurface_sync_set(ss, EINA_FALSE);
+
+quit_main_loop:
+ ecore_main_loop_quit();
+
+ return ECORE_CALLBACK_DONE;
+}
+
+/**
+ * @addtogroup ecore_wl2_subsurface_sync_set
+ * @{
+ * @objective Positive test case checks that the tested function calling without any errors.
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call tested function.
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_sync_set_p)
+{
+ if (startup_status != EINA_TRUE)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+ return;
+ }
+
+ timer_exit = ecore_timer_add(0.2, _timer_cb, NULL);
+ if (!timer_exit)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ ecore_main_loop_begin();
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup ecore_wl2_subsurface_sync_set
+ * @{
+ * @objective Negative test case checks if function call with invalid value works without segmentation fault
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call ecore_wl2_subsurface_sync_set with invalid value instead of the Ecore_Wl2_Subsurface object
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_sync_set_n)
+{
+ if (startup_status != EINA_TRUE)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+ return;
+ }
+
+ ecore_wl2_subsurface_sync_set(NULL, EINA_TRUE);
+
+ ecore_wl2_subsurface_sync_set(NULL, EINA_FALSE);
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_ecore_wl2_subsurface_sync_set()
+{
+ TCase *tcase = tcase_create("utc_ecore_wl2_subsurface_sync_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_ecore_wl2_subsurface_sync_set_p);
+ tcase_add_test(tcase, utc_ecore_wl2_subsurface_sync_set_n);
+ return tcase;
+}
--- /dev/null
+#include <check.h>
+#include <Eina.h>
+#include <Ecore.h>
+#include <Ecore_Wl2.h>
+
+static Eina_Bool startup_status = EINA_FALSE;
+static Ecore_Timer *timer_exit = NULL;
+
+/**
+ * @addtogroup ecore_wl2
+ * @{
+ * @defgroup ecore_wl2_subsurface_video_surface_destination_set ecore_wl2_subsurface_video_surface_destination_set()
+ *
+ * @precondition
+ * @step 1 Initialize Ecore_Wl2 with ecore_wl2_init()
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ if (ecore_wl2_init())
+ {
+ startup_status = EINA_TRUE;
+ }
+}
+
+static void
+teardown(void)
+{
+ ecore_wl2_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool _timer_cb(void *data)
+{
+ Eina_Bool ret;
+ Ecore_Wl2_Subsurface *ss;
+ Ecore_Wl2_Display *ewd = NULL;
+ //Connect the display.
+ ewd = ecore_wl2_display_connect(NULL);
+ if (!ewd)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+ Ecore_Wl2_Window *win = NULL;
+ win = ecore_wl2_window_new(ewd, NULL, 0, 0, 1, 1);
+ if (!win)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+ ss = ecore_wl2_subsurface_new(win);
+ if (!ss)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+ ret = ecore_wl2_subsurface_video_surface_prepare(ss);
+ if (!ret)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+ ret = ecore_wl2_subsurface_video_surface_destination_set(ss, 0, 0, 1, 1);
+ if (!ret)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+quit_main_loop:
+ ecore_main_loop_quit();
+
+ return ECORE_CALLBACK_DONE;
+}
+
+/**
+ * @addtogroup ecore_wl2_subsurface_video_surface_destination_set
+ * @{
+ * @objective Positive test case checks that the tested function calling without any errors.
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call tested function.
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_video_surface_destination_set_p)
+{
+ if (startup_status != EINA_TRUE)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+ return;
+ }
+
+ timer_exit = ecore_timer_add(0.2, _timer_cb, NULL);
+ if (!timer_exit)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ ecore_main_loop_begin();
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup ecore_wl2_subsurface_video_surface_destination_set
+ * @{
+ * @objective Negative test case checks if function call with invalid value works without segmentation fault
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call ecore_wl2_subsurface_video_surface_destination_set with invalid value instead of the Ecore_Wl2_Subsurface object
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_video_surface_destination_set_n)
+{
+ Eina_Bool ret;
+ if (startup_status != EINA_TRUE)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+ return;
+ }
+
+ ret = ecore_wl2_subsurface_video_surface_destination_set(NULL, 0, 0, 1, 1);
+
+ if (ret)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ return;
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_ecore_wl2_subsurface_video_surface_destination_set()
+{
+ TCase *tcase = tcase_create("utc_ecore_wl2_subsurface_video_surface_destination_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_ecore_wl2_subsurface_video_surface_destination_set_p);
+ tcase_add_test(tcase, utc_ecore_wl2_subsurface_video_surface_destination_set_n);
+ return tcase;
+}
--- /dev/null
+#include <check.h>
+#include <Eina.h>
+#include <Ecore.h>
+#include <Ecore_Wl2.h>
+
+static Eina_Bool startup_status = EINA_FALSE;
+static Ecore_Timer *timer_exit = NULL;
+
+/**
+ * @addtogroup ecore_wl2
+ * @{
+ * @defgroup ecore_wl2_subsurface_video_surface_prepare ecore_wl2_subsurface_video_surface_prepare()
+ *
+ * @precondition
+ * @step 1 Initialize Ecore_Wl2 with ecore_wl2_init()
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ if (ecore_wl2_init())
+ {
+ startup_status = EINA_TRUE;
+ }
+}
+
+static void
+teardown(void)
+{
+ ecore_wl2_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool _timer_cb(void *data)
+{
+ Eina_Bool ret;
+ Ecore_Wl2_Subsurface *ss;
+ Ecore_Wl2_Display *ewd = NULL;
+ //Connect the display.
+ ewd = ecore_wl2_display_connect(NULL);
+ if (!ewd)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+ Ecore_Wl2_Window *win = NULL;
+ win = ecore_wl2_window_new(ewd, NULL, 0, 0, 1, 1);
+ if (!win)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+ ss = ecore_wl2_subsurface_new(win);
+ if (!ss)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+ ret = ecore_wl2_subsurface_video_surface_prepare(ss);
+ if (!ret)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ goto quit_main_loop;
+ }
+
+quit_main_loop:
+ ecore_main_loop_quit();
+
+ return ECORE_CALLBACK_DONE;
+}
+
+/**
+ * @addtogroup ecore_wl2_subsurface_video_surface_prepare
+ * @{
+ * @objective Positive test case checks that the tested function calling without any errors.
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call tested function.
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_video_surface_prepare_p)
+{
+ if (startup_status != EINA_TRUE)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+ return;
+ }
+
+ timer_exit = ecore_timer_add(0.2, _timer_cb, NULL);
+ if (!timer_exit)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ ecore_main_loop_begin();
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup ecore_wl2_subsurface_video_surface_prepare
+ * @{
+ * @objective Negative test case checks if function call with invalid value works without segmentation fault
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call ecore_wl2_subsurface_video_surface_prepare with invalid value instead of the Ecore_Wl2_Subsurface object
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_ecore_wl2_subsurface_video_surface_prepare_n)
+{
+ Eina_Bool ret;
+
+ if (startup_status != EINA_TRUE)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+ return;
+ }
+
+ ret = ecore_wl2_subsurface_video_surface_prepare(NULL);
+ if (ret)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (The returned value is wrong)", __FILE__, __LINE__);
+ return;
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_ecore_wl2_subsurface_video_surface_prepare()
+{
+ TCase *tcase = tcase_create("utc_ecore_wl2_subsurface_video_surface_prepare");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_ecore_wl2_subsurface_video_surface_prepare_p);
+ tcase_add_test(tcase, utc_ecore_wl2_subsurface_video_surface_prepare_n);
+ return tcase;
+}