New container widget has been added.
[Added API]
elm_relative_container_add
elm_relative_container_relation_left_set
elm_relative_container_relation_left_get
elm_relative_container_relation_right_set
elm_relative_container_relation_right_get
elm_relative_container_relation_top_set
elm_relative_container_relation_top_get
elm_relative_container_relation_bottom_set
elm_relative_container_relation_bottom_get
elm_relative_container_children_get
Change-Id: I2cee106e5570f2d2a15a8f3773af27cd528e19ef
--- /dev/null
+CC ?= gcc
+
+C_FILES = $(shell cat tslist)
+
+PKGS = elementary check
+
+EXTRA_LDFLAGS = `pkg-config --libs $(PKGS)`
+
+EXTRA_CFLAGS = -I. `pkg-config --cflags $(PKGS)`
+EXTRA_CFLAGS += -Wall
+
+#TARGETS = $(C_FILES:%.c=tc-%)
+TCS := $(shell cat tslist | cut -d. -f1)
+
+all: $(TCS)
+
+%: %.c
+ $(CC) -c $< $(CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS)
+
+clean:
+ rm -f $(TCS)
--- /dev/null
+utc_elm_relative_container_children_get.c
+utc_elm_relative_container_relation_bottom_get_set.c
+utc_elm_relative_container_relation_left_get_set.c
+utc_elm_relative_container_relation_right_get_set.c
+utc_elm_relative_container_relation_top_get_set.c
--- /dev/null
+utc_elm_relative_container_children_get.c
+utc_elm_relative_container_relation_bottom_get_set.c
+utc_elm_relative_container_relation_left_get_set.c
+utc_elm_relative_container_relation_right_get_set.c
+utc_elm_relative_container_relation_top_get_set.c
--- /dev/null
+utc_elm_relative_container_children_get.c
+utc_elm_relative_container_relation_bottom_get_set.c
+utc_elm_relative_container_relation_left_get_set.c
+utc_elm_relative_container_relation_right_get_set.c
+utc_elm_relative_container_relation_top_get_set.c
--- /dev/null
+utc_elm_relative_container_children_get.c
+utc_elm_relative_container_relation_bottom_get_set.c
+utc_elm_relative_container_relation_left_get_set.c
+utc_elm_relative_container_relation_right_get_set.c
+utc_elm_relative_container_relation_top_get_set.c
--- /dev/null
+utc_elm_relative_container_children_get.c
+utc_elm_relative_container_relation_bottom_get_set.c
+utc_elm_relative_container_relation_left_get_set.c
+utc_elm_relative_container_relation_right_get_set.c
+utc_elm_relative_container_relation_top_get_set.c
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+
+#define WIDTH 400
+#define HEIGHT 400
+#define CHILD_NUM 3
+
+static Evas_Object *main_win = NULL, *child_array[CHILD_NUM] = {NULL,};
+/**
+ * @addtogroup elm_relative_container
+ * @{
+ * @defgroup elm_relative_container_relation_add
+ * elm_relative_container_relation_add()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create main window
+ * @step 3 Create child objects
+ * @step 6 Show child objects
+ * @step 4 Resize main window
+ * @step 5 Show main window
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ return;
+ }
+ for (int i = 0; i < CHILD_NUM; i++)
+ {
+ child_array[i] = elm_button_add(main_win);
+ if (child_array[i] == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a child obejct..", __FILE__, __LINE__);
+ return;
+ }
+ evas_object_show(child_array[i]);
+ }
+
+ evas_object_resize(main_win, WIDTH, HEIGHT);
+ evas_object_show(main_win);
+}
+
+static void
+teardown(void)
+{
+ if (main_win)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+
+ for (int i = 0; i < CHILD_NUM; i++)
+ {
+ if (child_array[i])
+ {
+ evas_object_del(child_array[i]);
+ child_array[i] = NULL;
+ }
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool
+_close_loop(void *data)
+{
+ elm_exit();
+
+ return EINA_FALSE;
+}
+
+/**
+ * @addtogroup elm_relative_container_children_get
+ * @{
+ * @objective Positive test case checks if function call with valid values to
+ * get the children of relative_container.
+ * @n Input Data:
+ * @li the relative_container object
+ *
+ * @procedure
+ * @step 1 Create relative_container.
+ * @step 2 Check returned relative_container object on NULL.
+ * @step 3 Add the children to relative_container.
+ * @step 4 Get the children.
+ * @step 5 Check returned list.
+ *
+ * @passcondition Returned values must equals expected value and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_relative_container_children_get_p)
+{
+ Evas_Object *container = NULL;
+ Eina_List *child_list = NULL;
+
+ container = elm_relative_container_add(main_win);
+ if (container == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ for (int i = 0; i < CHILD_NUM; i++)
+ {
+ elm_relative_container_relation_left_set(container, child_array[i], container, 0.0);
+ }
+
+ child_list = elm_relative_container_children_get(container);
+ if (child_list == NULL || eina_list_count(child_list) != CHILD_NUM)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_relative_container_children_get
+ * @{
+ * @objective Negative test case checks whether function call with NULL
+ * instead of the relative_container object works properly and without
+ * segmentation fault
+ * @n Input Data:
+ * @li the relative_container object
+ * @li the child object
+ * @li the relative position
+ *
+ * @procedure
+ * @step 1 Call function with negative parametrs
+ *
+ * @passcondition Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_relative_container_children_get_n)
+{
+ Eina_List *list = NULL;
+ list = elm_relative_container_children_get(NULL);
+ if (list != NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_relative_container_children_get()
+{
+ TCase *tcase = tcase_create("utc_elm_relative_container_children_get");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_relative_container_children_get_p);
+ tcase_add_test(tcase, utc_elm_relative_container_children_get_n);
+ return tcase;
+}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+
+static Evas_Object *main_win = NULL, *child = NULL;
+
+#define WIDTH 400
+#define HEIGHT 400
+/**
+ * @addtogroup elm_relative_container
+ * @{
+ * @defgroup elm_relative_container_relation_bottom_get
+ * elm_relative_container_relation_bottom_get()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create main window
+ * @step 3 Create child object
+ * @step 4 Resize main window
+ * @step 5 Show main window
+ * @step 6 Show child object
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ return;
+ }
+ child = elm_button_add(main_win);
+ if (child == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a child obejct..", __FILE__, __LINE__);
+ return;
+ }
+
+ evas_object_resize(main_win, WIDTH, HEIGHT);
+ evas_object_show(main_win);
+ evas_object_show(child);
+}
+
+static void
+teardown(void)
+{
+ if (main_win)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+
+ if (child)
+ {
+ evas_object_del(child);
+ child = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool
+_close_loop(void *data)
+{
+ elm_exit();
+
+ return EINA_FALSE;
+}
+
+/**
+ * @addtogroup elm_relative_container_relation_bottom_get
+ * @{
+ * @objective Positive test case checks if function call with valid values to
+ * get the relation bottom.
+ * @n Input Data:
+ * @li the relative_container object
+ * @li the child object
+ * @li the relative position
+ *
+ * @procedure
+ * @step 1 Create relative_container.
+ * @step 2 Check returned relative_container object on NULL.
+ * @step 3 Set relation bottom of child.
+ * @step 5 Get relation bottom of child.
+ * @step 6 Check returned relation bottom value on expected value.
+ *
+ * @passcondition Returned values must equals expected value and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_relative_container_relation_bottom_get_set_p)
+{
+ Evas_Object *container = NULL;
+ Evas_Object *base = NULL;
+ double relative_position = 0.0;
+
+ container = elm_relative_container_add(main_win);
+ if (container == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ elm_relative_container_relation_bottom_set(container, child, container, 0.3);
+ elm_relative_container_relation_bottom_get(container, child, &base, &relative_position);
+
+ if (!EINA_DBL_EQ(relative_position, 0.3) || base != container)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_relative_container_relation_bottom_set
+ * @{
+ * @objective Negative test case 01 checks whether function call with NULL
+ * instead of the relative_container object works properly and without
+ * segmentation fault
+ * @n Input Data:
+ * @li the relative_container object
+ * @li the child object
+ * @li the relative position
+ *
+ * @procedure
+ * @step 1 Call function with negative parametrs
+ *
+ * @passcondition Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_relative_container_relation_bottom_set_n1)
+{
+ elm_relative_container_relation_bottom_set(NULL, child, NULL, 0.3);
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_relative_container_relation_bottom_set
+ * @{
+ * @objective Negative test case 02 checks whether function call with NULL
+ * instead of the child object works properly and without segmentation fault
+ * @n Input Data:
+ * @li the relative_container object
+ * @li the child object
+ * @li the relative position
+ *
+ * @procedure
+ * @step 1 Call function with negative parametrs
+ *
+ * @passcondition Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_relative_container_relation_bottom_set_n2)
+{
+ Evas_Object *container = elm_relative_container_add(main_win);
+
+ elm_relative_container_relation_bottom_set(container, NULL, NULL, 0.3);
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_relative_container_relation_bottom_get
+ * @{
+ * @objective Negative test case 01 checks whether function call with NULL
+ * instead of the relative_container object works properly and without
+ * segmentation fault
+ * @n Input Data:
+ * @li the relative_container object
+ * @li the child object
+ * @li the relative position
+ *
+ * @procedure
+ * @step 1 Call function with negative parametrs
+ * @step 2 Check returned relation bottom value on zero-value.
+ *
+ * @passcondition Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_relative_container_relation_bottom_get_n1)
+{
+ Evas_Object *base = NULL;
+ double relative_position = 0.0;
+
+ elm_relative_container_relation_bottom_get(NULL, child, &base, &relative_position);
+
+ if (!EINA_DBL_EQ(relative_position, 0.0) || base != NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_relative_container_relation_bottom_get
+ * @{
+ * @objective Negative test case 02 checks whether function call with NULL
+ * instead of the child object works properly and without segmentation fault
+ * @n Input Data:
+ * @li the relative_container object
+ * @li the child object
+ * @li the relative position
+ *
+ * @procedure
+ * @step 1 Call function with negative parametrs
+ * @step 2 Check returned relation bottom value on default value.
+ *
+ * @passcondition Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_relative_container_relation_bottom_get_n2)
+{
+ Evas_Object *container = elm_relative_container_add(main_win);
+ Evas_Object *base = NULL;
+ double relative_position = 0.0;
+
+ elm_relative_container_relation_bottom_get(container, NULL, &base, &relative_position);
+
+ if (!EINA_DBL_EQ(relative_position, 0.0) || base != NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_relative_container_relation_bottom_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_relative_container_relation_bottom_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_relative_container_relation_bottom_get_set_p);
+ tcase_add_test(tcase, utc_elm_relative_container_relation_bottom_set_n1);
+ tcase_add_test(tcase, utc_elm_relative_container_relation_bottom_set_n2);
+ tcase_add_test(tcase, utc_elm_relative_container_relation_bottom_get_n1);
+ tcase_add_test(tcase, utc_elm_relative_container_relation_bottom_get_n2);
+ return tcase;
+}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+
+static Evas_Object *main_win = NULL, *child = NULL;
+
+#define WIDTH 400
+#define HEIGHT 400
+/**
+ * @addtogroup elm_relative_container
+ * @{
+ * @defgroup elm_relative_container_relation_left_get
+ * elm_relative_container_relation_left_get()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create main window
+ * @step 3 Create child object
+ * @step 4 Resize main window
+ * @step 5 Show main window
+ * @step 6 Show child object
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ return;
+ }
+ child = elm_button_add(main_win);
+ if (child == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a child obejct..", __FILE__, __LINE__);
+ return;
+ }
+
+ evas_object_resize(main_win, WIDTH, HEIGHT);
+ evas_object_show(main_win);
+ evas_object_show(child);
+}
+
+static void
+teardown(void)
+{
+ if (main_win)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+
+ if (child)
+ {
+ evas_object_del(child);
+ child = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool
+_close_loop(void *data)
+{
+ elm_exit();
+
+ return EINA_FALSE;
+}
+
+/**
+ * @addtogroup elm_relative_container_relation_left_get
+ * @{
+ * @objective Positive test case checks if function call with valid values to
+ * get the relation left.
+ * @n Input Data:
+ * @li the relative_container object
+ * @li the child object
+ * @li the relative position
+ *
+ * @procedure
+ * @step 1 Create relative_container.
+ * @step 2 Check returned relative_container object on NULL.
+ * @step 3 Set relation left of child.
+ * @step 5 Get relation left of child.
+ * @step 6 Check returned relation left value on expected value.
+ *
+ * @passcondition Returned values must equals expected value and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_relative_container_relation_left_get_set_p)
+{
+ Evas_Object *container = NULL;
+ Evas_Object *base = NULL;
+ double relative_position = 0.0;
+
+ container = elm_relative_container_add(main_win);
+ if (container == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ elm_relative_container_relation_left_set(container, child, container, 0.3);
+ elm_relative_container_relation_left_get(container, child, &base, &relative_position);
+
+ if (!EINA_DBL_EQ(relative_position, 0.3) || base != container)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_relative_container_relation_left_set
+ * @{
+ * @objective Negative test case 01 checks whether function call with NULL
+ * instead of the relative_container object works properly and without
+ * segmentation fault
+ * @n Input Data:
+ * @li the relative_container object
+ * @li the child object
+ * @li the relative position
+ *
+ * @procedure
+ * @step 1 Call function with negative parametrs
+ *
+ * @passcondition Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_relative_container_relation_left_set_n1)
+{
+ elm_relative_container_relation_left_set(NULL, child, NULL, 0.3);
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_relative_container_relation_left_set
+ * @{
+ * @objective Negative test case 02 checks whether function call with NULL
+ * instead of the child object works properly and without segmentation fault
+ * @n Input Data:
+ * @li the relative_container object
+ * @li the child object
+ * @li the relative position
+ *
+ * @procedure
+ * @step 1 Call function with negative parametrs
+ *
+ * @passcondition Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_relative_container_relation_left_set_n2)
+{
+ Evas_Object *container = elm_relative_container_add(main_win);
+
+ elm_relative_container_relation_left_set(container, NULL, NULL, 0.3);
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_relative_container_relation_left_get
+ * @{
+ * @objective Negative test case 01 checks whether function call with NULL
+ * instead of the relative_container object works properly and without
+ * segmentation fault
+ * @n Input Data:
+ * @li the relative_container object
+ * @li the child object
+ * @li the relative position
+ *
+ * @procedure
+ * @step 1 Call function with negative parametrs
+ * @step 2 Check returned relation left value on zero-value.
+ *
+ * @passcondition Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_relative_container_relation_left_get_n1)
+{
+ Evas_Object *base = NULL;
+ double relative_position = 0.0;
+
+ elm_relative_container_relation_left_get(NULL, child, &base, &relative_position);
+
+ if (!EINA_DBL_EQ(relative_position, 0.0) || base != NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_relative_container_relation_left_get
+ * @{
+ * @objective Negative test case 02 checks whether function call with NULL
+ * instead of the child object works properly and without segmentation fault
+ * @n Input Data:
+ * @li the relative_container object
+ * @li the child object
+ * @li the relative position
+ *
+ * @procedure
+ * @step 1 Call function with negative parametrs
+ * @step 2 Check returned relation left value on default value.
+ *
+ * @passcondition Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_relative_container_relation_left_get_n2)
+{
+ Evas_Object *container = elm_relative_container_add(main_win);
+ Evas_Object *base = NULL;
+ double relative_position = 0.0;
+
+ elm_relative_container_relation_left_get(container, NULL, &base, &relative_position);
+
+ if (!EINA_DBL_EQ(relative_position, 0.0) || base != NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_relative_container_relation_left_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_relative_container_relation_left_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_relative_container_relation_left_get_set_p);
+ tcase_add_test(tcase, utc_elm_relative_container_relation_left_set_n1);
+ tcase_add_test(tcase, utc_elm_relative_container_relation_left_set_n2);
+ tcase_add_test(tcase, utc_elm_relative_container_relation_left_get_n1);
+ tcase_add_test(tcase, utc_elm_relative_container_relation_left_get_n2);
+ return tcase;
+}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+
+static Evas_Object *main_win = NULL, *child = NULL;
+
+#define WIDTH 400
+#define HEIGHT 400
+/**
+ * @addtogroup elm_relative_container
+ * @{
+ * @defgroup elm_relative_container_relation_right_get
+ * elm_relative_container_relation_right_get()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create main window
+ * @step 3 Create child object
+ * @step 4 Resize main window
+ * @step 5 Show main window
+ * @step 6 Show child object
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ return;
+ }
+ child = elm_button_add(main_win);
+ if (child == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a child obejct..", __FILE__, __LINE__);
+ return;
+ }
+
+ evas_object_resize(main_win, WIDTH, HEIGHT);
+ evas_object_show(main_win);
+ evas_object_show(child);
+}
+
+static void
+teardown(void)
+{
+ if (main_win)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+
+ if (child)
+ {
+ evas_object_del(child);
+ child = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool
+_close_loop(void *data)
+{
+ elm_exit();
+
+ return EINA_FALSE;
+}
+
+/**
+ * @addtogroup elm_relative_container_relation_right_get
+ * @{
+ * @objective Positive test case checks if function call with valid values to
+ * get the relation right.
+ * @n Input Data:
+ * @li the relative_container object
+ * @li the child object
+ * @li the relative position
+ *
+ * @procedure
+ * @step 1 Create relative_container.
+ * @step 2 Check returned relative_container object on NULL.
+ * @step 3 Set relation right of child.
+ * @step 5 Get relation right of child.
+ * @step 6 Check returned relation right value on expected value.
+ *
+ * @passcondition Returned values must equals expected value and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_relative_container_relation_right_get_set_p)
+{
+ Evas_Object *container = NULL;
+ Evas_Object *base = NULL;
+ double relative_position = 0.0;
+
+ container = elm_relative_container_add(main_win);
+ if (container == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ elm_relative_container_relation_right_set(container, child, container, 0.3);
+ elm_relative_container_relation_right_get(container, child, &base, &relative_position);
+
+ if (!EINA_DBL_EQ(relative_position, 0.3) || base != container)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_relative_container_relation_right_set
+ * @{
+ * @objective Negative test case 01 checks whether function call with NULL
+ * instead of the relative_container object works properly and without
+ * segmentation fault
+ * @n Input Data:
+ * @li the relative_container object
+ * @li the child object
+ * @li the relative position
+ *
+ * @procedure
+ * @step 1 Call function with negative parametrs
+ *
+ * @passcondition Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_relative_container_relation_right_set_n1)
+{
+ elm_relative_container_relation_right_set(NULL, child, NULL, 0.3);
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_relative_container_relation_right_set
+ * @{
+ * @objective Negative test case 02 checks whether function call with NULL
+ * instead of the child object works properly and without segmentation fault
+ * @n Input Data:
+ * @li the relative_container object
+ * @li the child object
+ * @li the relative position
+ *
+ * @procedure
+ * @step 1 Call function with negative parametrs
+ *
+ * @passcondition Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_relative_container_relation_right_set_n2)
+{
+ Evas_Object *container = elm_relative_container_add(main_win);
+
+ elm_relative_container_relation_right_set(container, NULL, NULL, 0.3);
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_relative_container_relation_right_get
+ * @{
+ * @objective Negative test case 01 checks whether function call with NULL
+ * instead of the relative_container object works properly and without
+ * segmentation fault
+ * @n Input Data:
+ * @li the relative_container object
+ * @li the child object
+ * @li the relative position
+ *
+ * @procedure
+ * @step 1 Call function with negative parametrs
+ * @step 2 Check returned relation right value on zero-value.
+ *
+ * @passcondition Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_relative_container_relation_right_get_n1)
+{
+ Evas_Object *base = NULL;
+ double relative_position = 0.0;
+
+ elm_relative_container_relation_right_get(NULL, child, &base, &relative_position);
+
+ if (!EINA_DBL_EQ(relative_position, 0.0) || base != NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_relative_container_relation_right_get
+ * @{
+ * @objective Negative test case 02 checks whether function call with NULL
+ * instead of the child object works properly and without segmentation fault
+ * @n Input Data:
+ * @li the relative_container object
+ * @li the child object
+ * @li the relative position
+ *
+ * @procedure
+ * @step 1 Call function with negative parametrs
+ * @step 2 Check returned relation right value on default value.
+ *
+ * @passcondition Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_relative_container_relation_right_get_n2)
+{
+ Evas_Object *container = elm_relative_container_add(main_win);
+ Evas_Object *base = NULL;
+ double relative_position = 0.0;
+
+ elm_relative_container_relation_right_get(container, NULL, &base, &relative_position);
+
+ if (!EINA_DBL_EQ(relative_position, 0.0) || base != NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_relative_container_relation_right_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_relative_container_relation_right_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_relative_container_relation_right_get_set_p);
+ tcase_add_test(tcase, utc_elm_relative_container_relation_right_set_n1);
+ tcase_add_test(tcase, utc_elm_relative_container_relation_right_set_n2);
+ tcase_add_test(tcase, utc_elm_relative_container_relation_right_get_n1);
+ tcase_add_test(tcase, utc_elm_relative_container_relation_right_get_n2);
+ return tcase;
+}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+
+static Evas_Object *main_win = NULL, *child = NULL;
+
+#define WIDTH 400
+#define HEIGHT 400
+/**
+ * @addtogroup elm_relative_container
+ * @{
+ * @defgroup elm_relative_container_relation_top_get
+ * elm_relative_container_relation_top_get()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create main window
+ * @step 3 Create child object
+ * @step 4 Resize main window
+ * @step 5 Show main window
+ * @step 6 Show child object
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ return;
+ }
+ child = elm_button_add(main_win);
+ if (child == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a child obejct..", __FILE__, __LINE__);
+ return;
+ }
+
+ evas_object_resize(main_win, WIDTH, HEIGHT);
+ evas_object_show(main_win);
+ evas_object_show(child);
+}
+
+static void
+teardown(void)
+{
+ if (main_win)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+
+ if (child)
+ {
+ evas_object_del(child);
+ child = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool
+_close_loop(void *data)
+{
+ elm_exit();
+
+ return EINA_FALSE;
+}
+
+/**
+ * @addtogroup elm_relative_container_relation_top_get
+ * @{
+ * @objective Positive test case checks if function call with valid values to
+ * get the relation top.
+ * @n Input Data:
+ * @li the relative_container object
+ * @li the child object
+ * @li the relative position
+ *
+ * @procedure
+ * @step 1 Create relative_container.
+ * @step 2 Check returned relative_container object on NULL.
+ * @step 3 Set relation top of child.
+ * @step 5 Get relation top of child.
+ * @step 6 Check returned relation top value on expected value.
+ *
+ * @passcondition Returned values must equals expected value and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_relative_container_relation_top_get_set_p)
+{
+ Evas_Object *container = NULL;
+ Evas_Object *base = NULL;
+ double relative_position = 0.0;
+
+ container = elm_relative_container_add(main_win);
+ if (container == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ elm_relative_container_relation_top_set(container, child, container, 0.3);
+ elm_relative_container_relation_top_get(container, child, &base, &relative_position);
+
+ if (!EINA_DBL_EQ(relative_position, 0.3) || base != container)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_relative_container_relation_top_set
+ * @{
+ * @objective Negative test case 01 checks whether function call with NULL
+ * instead of the relative_container object works properly and without
+ * segmentation fault
+ * @n Input Data:
+ * @li the relative_container object
+ * @li the child object
+ * @li the relative position
+ *
+ * @procedure
+ * @step 1 Call function with negative parametrs
+ *
+ * @passcondition Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_relative_container_relation_top_set_n1)
+{
+ elm_relative_container_relation_top_set(NULL, child, NULL, 0.3);
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_relative_container_relation_top_set
+ * @{
+ * @objective Negative test case 02 checks whether function call with NULL
+ * instead of the child object works properly and without segmentation fault
+ * @n Input Data:
+ * @li the relative_container object
+ * @li the child object
+ * @li the relative position
+ *
+ * @procedure
+ * @step 1 Call function with negative parametrs
+ *
+ * @passcondition Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_relative_container_relation_top_set_n2)
+{
+ Evas_Object *container = elm_relative_container_add(main_win);
+
+ elm_relative_container_relation_top_set(container, NULL, NULL, 0.3);
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_relative_container_relation_top_get
+ * @{
+ * @objective Negative test case 01 checks whether function call with NULL
+ * instead of the relative_container object works properly and without
+ * segmentation fault
+ * @n Input Data:
+ * @li the relative_container object
+ * @li the child object
+ * @li the relative position
+ *
+ * @procedure
+ * @step 1 Call function with negative parametrs
+ * @step 2 Check returned relation top value on zero-value.
+ *
+ * @passcondition Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_relative_container_relation_top_get_n1)
+{
+ Evas_Object *base = NULL;
+ double relative_position = 0.0;
+
+ elm_relative_container_relation_top_get(NULL, child, &base, &relative_position);
+
+ if (!EINA_DBL_EQ(relative_position, 0.0) || base != NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_relative_container_relation_top_get
+ * @{
+ * @objective Negative test case 02 checks whether function call with NULL
+ * instead of the child object works properly and without segmentation fault
+ * @n Input Data:
+ * @li the relative_container object
+ * @li the child object
+ * @li the relative position
+ *
+ * @procedure
+ * @step 1 Call function with negative parametrs
+ * @step 2 Check returned relation top value on default value.
+ *
+ * @passcondition Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_relative_container_relation_top_get_n2)
+{
+ Evas_Object *container = elm_relative_container_add(main_win);
+ Evas_Object *base = NULL;
+ double relative_position = 0.0;
+
+ elm_relative_container_relation_top_get(container, NULL, &base, &relative_position);
+
+ if (!EINA_DBL_EQ(relative_position, 0.0) || base != NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_relative_container_relation_top_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_relative_container_relation_top_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_relative_container_relation_top_get_set_p);
+ tcase_add_test(tcase, utc_elm_relative_container_relation_top_set_n1);
+ tcase_add_test(tcase, utc_elm_relative_container_relation_top_set_n2);
+ tcase_add_test(tcase, utc_elm_relative_container_relation_top_get_n1);
+ tcase_add_test(tcase, utc_elm_relative_container_relation_top_get_n2);
+ return tcase;
+}
/elementary/profile/tslist
/elementary/progressbar/tslist
/elementary/radio/tslist
+/elementary/relative_container/tslist
/elementary/scroll/tslist
/elementary/scroller/tslist
/elementary/segmentcontrol/tslist
/elementary/profile/tslist_mobile
/elementary/progressbar/tslist_mobile
/elementary/radio/tslist_mobile
+/elementary/relative_container/tslist_mobile
/elementary/scroll/tslist_mobile
/elementary/scroller/tslist_mobile
/elementary/segmentcontrol/tslist_mobile
/elementary/profile/tslist_wear
/elementary/progressbar/tslist_wear
/elementary/radio/tslist_wear
+/elementary/relative_container/tslist_wear
/elementary/scroll/tslist_wear
/elementary/scroller/tslist_wear
#/elementary/segmentcontrol/tslist_wear
/elementary/profile/tslist_tv
/elementary/progressbar/tslist_tv
/elementary/radio/tslist_tv
+/elementary/relative_container/tslist_tv
/elementary/scroll/tslist_tv
/elementary/scroller/tslist_tv
/elementary/segmentcontrol/tslist_tv
/elementary/profile/tslist_fhub
/elementary/progressbar/tslist_fhub
/elementary/radio/tslist_fhub
+/elementary/relative_container/tslist_fhub
/elementary/scroll/tslist_fhub
/elementary/scroller/tslist_fhub
/elementary/segmentcontrol/tslist_fhub