#utc_elm_list_bounce_get.c
utc_elm_list_clear.c
utc_elm_list_go.c
-utc_elm_list_horizontal_get.c
-utc_elm_list_horizontal_set.c
+utc_elm_list_horizontal_get_set.c
utc_elm_list_item_append.c
utc_elm_list_item_bring_in.c
utc_elm_list_item_insert_after.c
utc_elm_list_item_next.c
utc_elm_list_item_prepend.c
utc_elm_list_item_prev.c
-utc_elm_list_item_selected_get.c
-utc_elm_list_item_selected_set.c
-utc_elm_list_item_separator_set.c
-utc_elm_list_item_separator_get.c
+utc_elm_list_item_selected_get_set.c
+utc_elm_list_item_separator_get_set.c
utc_elm_list_items_get.c
utc_elm_list_item_show.c
utc_elm_list_item_sorted_insert.c
-utc_elm_list_mode_get.c
-utc_elm_list_mode_set.c
-utc_elm_list_multi_select_get.c
-utc_elm_list_multi_select_set.c
+utc_elm_list_mode_get_set.c
+utc_elm_list_multi_select_get_set.c
#utc_elm_list_scroller_policy_get.c
#utc_elm_list_scroller_policy_set.c
utc_elm_list_selected_item_get.c
-utc_elm_list_select_mode_get.c
-utc_elm_list_select_mode_set.c
+utc_elm_list_select_mode_get_set.c
utc_elm_list_at_xy_item_get.c
utc_elm_list_first_item_get.c
utc_elm_list_item_object_get.c
#utc_elm_list_bounce_get.c
utc_elm_list_clear.c
utc_elm_list_go.c
-utc_elm_list_horizontal_get.c
-utc_elm_list_horizontal_set.c
+utc_elm_list_horizontal_get_set.c
utc_elm_list_item_append.c
utc_elm_list_item_bring_in.c
utc_elm_list_item_insert_after.c
utc_elm_list_item_next.c
utc_elm_list_item_prepend.c
utc_elm_list_item_prev.c
-utc_elm_list_item_selected_get.c
-utc_elm_list_item_selected_set.c
-utc_elm_list_item_separator_set.c
-utc_elm_list_item_separator_get.c
+utc_elm_list_item_selected_get_set.c
+utc_elm_list_item_separator_get_set.c
utc_elm_list_items_get.c
utc_elm_list_item_show.c
utc_elm_list_item_sorted_insert.c
-utc_elm_list_mode_get.c
-utc_elm_list_mode_set.c
-utc_elm_list_multi_select_get.c
-utc_elm_list_multi_select_set.c
+utc_elm_list_mode_get_set.c
+utc_elm_list_multi_select_get_set.c
#utc_elm_list_scroller_policy_get.c
#utc_elm_list_scroller_policy_set.c
utc_elm_list_selected_item_get.c
-utc_elm_list_select_mode_get.c
-utc_elm_list_select_mode_set.c
+utc_elm_list_select_mode_get_set.c
utc_elm_list_at_xy_item_get.c
utc_elm_list_first_item_get.c
utc_elm_list_item_object_get.c
#utc_elm_list_bounce_get.c
utc_elm_list_clear.c
utc_elm_list_go.c
-utc_elm_list_horizontal_get.c
-utc_elm_list_horizontal_set.c
+utc_elm_list_horizontal_get_set.c
utc_elm_list_item_append.c
utc_elm_list_item_bring_in.c
utc_elm_list_item_insert_after.c
utc_elm_list_item_next.c
utc_elm_list_item_prepend.c
utc_elm_list_item_prev.c
-utc_elm_list_item_selected_get.c
-utc_elm_list_item_selected_set.c
-utc_elm_list_item_separator_set.c
-utc_elm_list_item_separator_get.c
+utc_elm_list_item_selected_get_set.c
+utc_elm_list_item_separator_get_set.c
utc_elm_list_items_get.c
utc_elm_list_item_show.c
utc_elm_list_item_sorted_insert.c
-utc_elm_list_mode_get.c
-utc_elm_list_mode_set.c
-utc_elm_list_multi_select_get.c
-utc_elm_list_multi_select_set.c
+utc_elm_list_mode_get_set.c
+utc_elm_list_multi_select_get_set.c
#utc_elm_list_scroller_policy_get.c
#utc_elm_list_scroller_policy_set.c
utc_elm_list_selected_item_get.c
-utc_elm_list_select_mode_get.c
-utc_elm_list_select_mode_set.c
+utc_elm_list_select_mode_get_set.c
utc_elm_list_at_xy_item_get.c
utc_elm_list_first_item_get.c
utc_elm_list_item_object_get.c
#utc_elm_list_bounce_get.c
utc_elm_list_clear.c
utc_elm_list_go.c
-utc_elm_list_horizontal_get.c
-utc_elm_list_horizontal_set.c
+utc_elm_list_horizontal_get_set.c
utc_elm_list_item_append.c
utc_elm_list_item_bring_in.c
utc_elm_list_item_insert_after.c
utc_elm_list_item_next.c
utc_elm_list_item_prepend.c
utc_elm_list_item_prev.c
-utc_elm_list_item_selected_get.c
-utc_elm_list_item_selected_set.c
-utc_elm_list_item_separator_set.c
-utc_elm_list_item_separator_get.c
+utc_elm_list_item_selected_get_set.c
+utc_elm_list_item_separator_get_set.c
utc_elm_list_items_get.c
utc_elm_list_item_show.c
utc_elm_list_item_sorted_insert.c
-utc_elm_list_mode_get.c
-utc_elm_list_mode_set.c
-utc_elm_list_multi_select_get.c
-utc_elm_list_multi_select_set.c
+utc_elm_list_mode_get_set.c
+utc_elm_list_multi_select_get_set.c
#utc_elm_list_scroller_policy_get.c
#utc_elm_list_scroller_policy_set.c
utc_elm_list_selected_item_get.c
-utc_elm_list_select_mode_get.c
-utc_elm_list_select_mode_set.c
+utc_elm_list_select_mode_get_set.c
utc_elm_list_at_xy_item_get.c
utc_elm_list_first_item_get.c
utc_elm_list_item_object_get.c
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-
-#include "../../utc_negative_unitest.h"
-
-static const int labels_number = 7;
-static const char *labels[] =
-{
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
-};
-
-static Eina_Bool startup_status = EINA_FALSE;
-static Evas_Object *list = NULL;
-static Evas_Object *main_win = NULL;
-
-/**
- * @addtogroup elm_list
- * @{
- * @defgroup elm_list_horizontal_get elm_list_horizontal_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show a main window
- * @step 3 Create a list and add 7 items to it
- */
-
-static void
-setup(void)
-{
- unsigned int i;
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- {
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win != NULL)
- {
- evas_object_show(main_win);
- list = elm_list_add(main_win);
- if (list != NULL)
- {
- startup_status = EINA_TRUE;
- for (i = 0; i < labels_number; i++)
- {
- if (elm_list_item_append(list, labels[i], NULL, NULL, NULL, NULL) == NULL)
- {
- startup_status = EINA_FALSE;
- break;
- }
- }
- elm_list_select_mode_set(list, ELM_OBJECT_SELECT_MODE_ALWAYS);
- }
- }
- }
-}
-
-static void
-teardown(void)
-{
- if (list != NULL)
- {
- evas_object_del(list);
- list = NULL;
- }
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_list_horizontal_get
- * @{
- * @objective: Positive test case checks that the tested function enables and disables the horizontal mode for given list widget.
- * @n Input Data: the given list widget.
- *
- * @procedure
- * @step 1 Set horizontal mode as EINA_TRUE.
- * @step 2 Get horizontal mode.
- * @step 3 Set horizontal mode as EINA_FALSE.
- * @step 4 Get horizontal mode.
- *
- * @passcondition
- * In both cases the retrieved value of horizontal mode must be equal to the value which was set previously. Also, there is no segmentation fault.
- * @}
- */
-
-START_TEST(utc_elm_list_horizontal_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;
- }
-
- Eina_Bool ok = EINA_FALSE;
-
- elm_list_horizontal_set(list, EINA_TRUE);
- if (elm_list_horizontal_get(list) == EINA_TRUE)
- {
- elm_list_horizontal_set(list, EINA_FALSE);
- if (elm_list_horizontal_get(list) == EINA_FALSE)
- {
- ok = EINA_TRUE;
- }
- }
-
- if (ok != EINA_TRUE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_list_horizontal_get
- * @{
- * @objective Negative test case checks situation if the argument of tested function is NULL.
- * @n Input Data: the given list widget (it will be replaced by NULL in the universal macro).
- *
- * @procedure
- * @step 1 Call elm_list_horizontal_get with NULL params.
- *
- * @passcondition
- * Tested function must return EINA_FALSE, and there is no segmentation fault.
- * @}
- */
-START_TEST(utc_elm_list_horizontal_get_n)
-{
- if (startup_status != EINA_TRUE)
- {
- ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
- return;
- }
-
- if (UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_list_horizontal_get, list) == TEST_FAIL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_list_horizontal_get()
-{
- TCase *tcase = tcase_create("utc_elm_list_horizontal_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_list_horizontal_get_p);
- tcase_add_test(tcase, utc_elm_list_horizontal_get_n);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+
+#include "../../utc_negative_unitest.h"
+
+static const int labels_number = 7;
+static const char *labels[] =
+{
+ "Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday"
+};
+
+static Eina_Bool startup_status = EINA_FALSE;
+static Evas_Object *list = NULL;
+static Evas_Object *main_win = NULL;
+
+/**
+ * @addtogroup elm_list
+ * @{
+ * @defgroup elm_list_horizontal_get elm_list_horizontal_get()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show a main window
+ * @step 3 Create a list and add 7 items to it
+ */
+
+static void
+setup(void)
+{
+ unsigned int i;
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ {
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win != NULL)
+ {
+ evas_object_show(main_win);
+ list = elm_list_add(main_win);
+ if (list != NULL)
+ {
+ startup_status = EINA_TRUE;
+ for (i = 0; i < labels_number; i++)
+ {
+ if (elm_list_item_append(list, labels[i], NULL, NULL, NULL, NULL) == NULL)
+ {
+ startup_status = EINA_FALSE;
+ break;
+ }
+ }
+ elm_list_select_mode_set(list, ELM_OBJECT_SELECT_MODE_ALWAYS);
+ }
+ }
+ }
+}
+
+static void
+teardown(void)
+{
+ if (list != NULL)
+ {
+ evas_object_del(list);
+ list = NULL;
+ }
+ if (main_win != NULL)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_list_horizontal_get
+ * @{
+ * @objective: Positive test case checks that the tested function enables and disables the horizontal mode for given list widget.
+ * @n Input Data: the given list widget.
+ *
+ * @procedure
+ * @step 1 Set horizontal mode as EINA_TRUE.
+ * @step 2 Get horizontal mode.
+ * @step 3 Set horizontal mode as EINA_FALSE.
+ * @step 4 Get horizontal mode.
+ *
+ * @passcondition
+ * In both cases the retrieved value of horizontal mode must be equal to the value which was set previously. Also, there is no segmentation fault.
+ * @}
+ */
+
+START_TEST(utc_elm_list_horizontal_get_p)
+{
+ if (startup_status != EINA_TRUE)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+ }
+
+ Eina_Bool ok = EINA_FALSE;
+
+ elm_list_horizontal_set(list, EINA_TRUE);
+ if (elm_list_horizontal_get(list) == EINA_TRUE)
+ {
+ elm_list_horizontal_set(list, EINA_FALSE);
+ if (elm_list_horizontal_get(list) == EINA_FALSE)
+ {
+ ok = EINA_TRUE;
+ }
+ }
+
+ if (ok != EINA_TRUE)
+ {
+ 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_list_horizontal_get
+ * @{
+ * @objective Negative test case checks situation if the argument of tested function is NULL.
+ * @n Input Data: the given list widget (it will be replaced by NULL in the universal macro).
+ *
+ * @procedure
+ * @step 1 Call elm_list_horizontal_get with NULL params.
+ *
+ * @passcondition
+ * Tested function must return EINA_FALSE, and there is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_elm_list_horizontal_get_n)
+{
+
+ if (UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_list_horizontal_get, list) == TEST_FAIL)
+ {
+ 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_list_horizontal_set
+ * @{
+ * @objective Negative test case checks situation if all arguments of tested function become NULL in turn.
+ * @n Input Data:
+ * @li the given list widget (it will be replaced by NULL in the universal macro);
+ * @li EINA_TRUE (optional).
+ *
+ * @procedure
+ * @step 1 Use CREATE_CHECKED_ARGS_ARRAY macro for defining arguments of tested function which are subject to substitution for NULL.
+ * @step 2 Call elm_list_horizontal_set with NULL params.
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_elm_list_horizontal_set_n)
+{
+
+ CREATE_CHECKED_ARGS_ARRAY(1,0);
+ UNITEST_FUNC_NEG_CA(elm_list_horizontal_set, list, EINA_TRUE);
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_list_horizontal_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_list_horizontal_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_list_horizontal_get_p);
+ tcase_add_test(tcase, utc_elm_list_horizontal_get_n);
+ tcase_add_test(tcase, utc_elm_list_horizontal_set_n);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-
-#include "../../utc_negative_unitest.h"
-
-static const int labels_number = 7;
-static const char *labels[] =
-{
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
-};
-
-static Eina_Bool startup_status = EINA_FALSE;
-static Evas_Object *list = NULL;
-static Evas_Object *main_win = NULL;
-
-/**
- * @addtogroup elm_list
- * @{
- * @defgroup elm_list_horizontal_set elm_list_horizontal_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show a main window
- * @step 3 Create a list and add 7 items to it
- */
-
-static void
-setup(void)
-{
- unsigned int i;
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- {
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win != NULL)
- {
- evas_object_show(main_win);
- list = elm_list_add(main_win);
- if (list != NULL)
- {
- startup_status = EINA_TRUE;
- for (i = 0; i < labels_number; i++)
- {
- if (elm_list_item_append(list, labels[i], NULL, NULL, NULL, NULL) == NULL)
- {
- startup_status = EINA_FALSE;
- break;
- }
- }
- elm_list_select_mode_set(list, ELM_OBJECT_SELECT_MODE_ALWAYS);
- }
- }
- }
-}
-
-static void
-teardown(void)
-{
- if (list != NULL)
- {
- evas_object_del(list);
- list = NULL;
- }
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_list_horizontal_set
- * @{
- * @objective: Positive test case checks that the tested function set horizontal mode for given list widget.
- * @n Input Data:
- * @li the given list widget;
- * @li value of horizontal mode.
- *
- * @procedure
- * @step 1 Set horizontal mode as EINA_TRUE.
- * @step 2 Get horizontal mode.
- * @step 3 Set horizontal mode as EINA_FALSE.
- * @step 4 Get horizontal mode.
- *
- * @passcondition
- * In both cases the retrieved value of horizontal mode must be equal to the value which was set previously. Also, there is no segmentation fault.
- * @}
- */
-
-START_TEST(utc_elm_list_horizontal_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;
- }
-
- Eina_Bool ok = EINA_FALSE;
-
- elm_list_horizontal_set(list, EINA_TRUE);
- if (elm_list_horizontal_get(list) == EINA_TRUE)
- {
- elm_list_horizontal_set(list, EINA_FALSE);
- if (elm_list_horizontal_get(list) == EINA_FALSE)
- {
- ok = EINA_TRUE;
- }
- }
-
- if (ok != EINA_TRUE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_list_horizontal_set
- * @{
- * @objective Negative test case checks situation if all arguments of tested function become NULL in turn.
- * @n Input Data:
- * @li the given list widget (it will be replaced by NULL in the universal macro);
- * @li EINA_TRUE (optional).
- *
- * @procedure
- * @step 1 Use CREATE_CHECKED_ARGS_ARRAY macro for defining arguments of tested function which are subject to substitution for NULL.
- * @step 2 Call elm_list_horizontal_set with NULL params.
- *
- * @passcondition
- * There is no segmentation fault.
- * @}
- */
-START_TEST(utc_elm_list_horizontal_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;
- }
-
- CREATE_CHECKED_ARGS_ARRAY(1,0);
- UNITEST_FUNC_NEG_CA(elm_list_horizontal_set, list, EINA_TRUE);
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_list_horizontal_set()
-{
- TCase *tcase = tcase_create("utc_elm_list_horizontal_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_list_horizontal_set_p);
- tcase_add_test(tcase, utc_elm_list_horizontal_set_n);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-
-#include "../../utc_negative_unitest.h"
-
-static const int labels_number = 7;
-static const char *labels[] =
-{
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
-};
-
-static Eina_Bool startup_status = EINA_FALSE;
-static Evas_Object *list = NULL;
-static Evas_Object *main_win = NULL;
-static Elm_Object_Item *item = NULL;
-static Eina_Bool is_selected = EINA_FALSE;
-
-/**
- * @addtogroup elm_list
- * @{
- * @defgroup elm_list_item_selected_get elm_list_item_selected_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show a main window
- * @step 3 Create a list and add 7 items to it
- */
-
-static void
-setup(void)
-{
- unsigned int i;
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- {
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win != NULL)
- {
- evas_object_show(main_win);
- list = elm_list_add(main_win);
- if (list != NULL)
- {
- startup_status = EINA_TRUE;
- for (i = 0; i < labels_number; i++)
- {
- if (elm_list_item_append(list, labels[i], NULL, NULL, NULL, NULL) == NULL)
- {
- startup_status = EINA_FALSE;
- break;
- }
- }
- elm_list_select_mode_set(list, ELM_OBJECT_SELECT_MODE_ALWAYS);
- evas_object_show(list);
- }
- }
- }
-}
-
-static void
-teardown(void)
-{
- if (list != NULL)
- {
- evas_object_del(list);
- list = NULL;
- }
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-static Eina_Bool _set_timer_cb_p1(void* data)
-{
- elm_list_item_selected_set(item, EINA_TRUE);
- return ECORE_CALLBACK_CANCEL;
-}
-
-static Eina_Bool _set_timer_cb_p2(void* data)
-{
- elm_list_item_selected_set(item, EINA_FALSE);
- return ECORE_CALLBACK_CANCEL;
-}
-
-static Eina_Bool _get_and_quit_timer_cb_p(void *data)
-{
- is_selected = elm_list_item_selected_get(item);
- ecore_main_loop_quit();
- return ECORE_CALLBACK_CANCEL;
-}
-
-/**
- * @addtogroup elm_list_item_selected_get
- * @{
- * @objective: Positive test case checks that the tested function correctly retrieves selection status of the given list widget item.
- * @n Input Data: the current list item.
- *
- * @procedure
- * @step 1 Get first item of the given list widget.
- * @step 2 Set this item as selected.
- * @step 3 Get the selected status of the item.
- * @step 4 Set this item as unselected.
- * @step 5 Get the selected status of the item.
- *
- * @passcondition
- * In first case the tested function must return EINA_TRUE, and in second case it must return EINA_FALSE. Also, there is no segmentation fault.
- * @}
- */
-
-START_TEST(utc_elm_list_item_selected_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;
- }
-
- item = elm_list_first_item_get(list);
- if (item == NULL)
- {
- ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- ecore_timer_add(1, _set_timer_cb_p1, NULL);
- ecore_timer_add(2, _get_and_quit_timer_cb_p, NULL);
- ecore_main_loop_begin();
-
- if (is_selected == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- ecore_timer_add(1, _set_timer_cb_p2, NULL);
- ecore_timer_add(2, _get_and_quit_timer_cb_p, NULL);
- ecore_main_loop_begin();
-
- if (is_selected == EINA_TRUE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_list_item_selected_get
- * @{
- * @objective Negative test case checks situation if the argument of tested function is NULL.
- * @n Input Data: the current list item (it will be replaced by NULL in the universal macro).
- *
- * @procedure
- * @step 1 Get first item of the given list widget.
- * @step 2 Call elm_list_item_selected_get with NULL params.
- *
- * @passcondition
- * Tested function must return EINA_FALSE, and there is no segmentation fault.
- * @}
- */
-START_TEST(utc_elm_list_item_selected_get_n)
-{
- if (startup_status != EINA_TRUE)
- {
- ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
- return;
- }
-
- if (UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_list_item_selected_get, NULL) == TEST_FAIL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_list_item_selected_get()
-{
- TCase *tcase = tcase_create("utc_elm_list_item_selected_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_list_item_selected_get_p);
- tcase_add_test(tcase, utc_elm_list_item_selected_get_n);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+
+#include "../../utc_negative_unitest.h"
+
+static const int labels_number = 7;
+static const char *labels[] =
+{
+ "Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday"
+};
+
+static Eina_Bool startup_status = EINA_FALSE;
+static Evas_Object *list = NULL;
+static Evas_Object *main_win = NULL;
+static Elm_Object_Item *item = NULL;
+static Eina_Bool is_selected = EINA_FALSE;
+
+/**
+ * @addtogroup elm_list
+ * @{
+ * @defgroup elm_list_item_selected_get elm_list_item_selected_get()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show a main window
+ * @step 3 Create a list and add 7 items to it
+ */
+
+static void
+setup(void)
+{
+ unsigned int i;
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ {
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win != NULL)
+ {
+ evas_object_show(main_win);
+ list = elm_list_add(main_win);
+ if (list != NULL)
+ {
+ startup_status = EINA_TRUE;
+ for (i = 0; i < labels_number; i++)
+ {
+ if (elm_list_item_append(list, labels[i], NULL, NULL, NULL, NULL) == NULL)
+ {
+ startup_status = EINA_FALSE;
+ break;
+ }
+ }
+ elm_list_select_mode_set(list, ELM_OBJECT_SELECT_MODE_ALWAYS);
+ evas_object_show(list);
+ }
+ }
+ }
+}
+
+static void
+teardown(void)
+{
+ if (list != NULL)
+ {
+ evas_object_del(list);
+ list = NULL;
+ }
+ if (main_win != NULL)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool _set_timer_cb_p1(void* data)
+{
+ elm_list_item_selected_set(item, EINA_TRUE);
+ return ECORE_CALLBACK_CANCEL;
+}
+
+static Eina_Bool _set_timer_cb_p2(void* data)
+{
+ elm_list_item_selected_set(item, EINA_FALSE);
+ return ECORE_CALLBACK_CANCEL;
+}
+
+static Eina_Bool _get_and_quit_timer_cb_p(void *data)
+{
+ is_selected = elm_list_item_selected_get(item);
+ ecore_main_loop_quit();
+ return ECORE_CALLBACK_CANCEL;
+}
+
+/**
+ * @addtogroup elm_list_item_selected_get
+ * @{
+ * @objective: Positive test case checks that the tested function correctly retrieves selection status of the given list widget item.
+ * @n Input Data: the current list item.
+ *
+ * @procedure
+ * @step 1 Get first item of the given list widget.
+ * @step 2 Set this item as selected.
+ * @step 3 Get the selected status of the item.
+ * @step 4 Set this item as unselected.
+ * @step 5 Get the selected status of the item.
+ *
+ * @passcondition
+ * In first case the tested function must return EINA_TRUE, and in second case it must return EINA_FALSE. Also, there is no segmentation fault.
+ * @}
+ */
+
+START_TEST(utc_elm_list_item_selected_get_p)
+{
+ if (startup_status != EINA_TRUE)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+ }
+
+ item = elm_list_first_item_get(list);
+ if (item == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ ecore_timer_add(1, _set_timer_cb_p1, NULL);
+ ecore_timer_add(2, _get_and_quit_timer_cb_p, NULL);
+ ecore_main_loop_begin();
+
+ if (is_selected == EINA_FALSE)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ ecore_timer_add(1, _set_timer_cb_p2, NULL);
+ ecore_timer_add(2, _get_and_quit_timer_cb_p, NULL);
+ ecore_main_loop_begin();
+
+ if (is_selected == EINA_TRUE)
+ {
+ 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_list_item_selected_get
+ * @{
+ * @objective Negative test case checks situation if the argument of tested function is NULL.
+ * @n Input Data: the current list item (it will be replaced by NULL in the universal macro).
+ *
+ * @procedure
+ * @step 1 Get first item of the given list widget.
+ * @step 2 Call elm_list_item_selected_get with NULL params.
+ *
+ * @passcondition
+ * Tested function must return EINA_FALSE, and there is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_elm_list_item_selected_get_n)
+{
+
+ if (UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_list_item_selected_get, NULL) == TEST_FAIL)
+ {
+ 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_list_item_selected_set
+ * @{
+ * @objective Negative test case checks situation if the argument of tested function is NULL.
+ * @n Input Data:
+ * @li the current list item (it will be replaced by NULL in the universal macro);
+ * @li EINA_TRUE.
+ *
+ * @procedure
+ * @step 1 Get first item of the given list widget.
+ * @step 2 Use CREATE_CHECKED_ARGS_ARRAY macro for defining arguments of tested function which are subject to substitution for NULL.
+ * @step 3 Call elm_list_item_selected_set with NULL params.
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_elm_list_item_selected_set_n)
+{
+
+ CREATE_CHECKED_ARGS_ARRAY(1,0);
+ UNITEST_FUNC_NEG_CA(elm_list_item_selected_set, NULL, EINA_TRUE);
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_list_item_selected_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_list_item_selected_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_list_item_selected_get_p);
+ tcase_add_test(tcase, utc_elm_list_item_selected_get_n);
+ tcase_add_test(tcase, utc_elm_list_item_selected_set_n);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-
-#include "../../utc_negative_unitest.h"
-
-static const int labels_number = 7;
-static const char *labels[] =
-{
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
-};
-
-static Eina_Bool startup_status = EINA_FALSE;
-static Evas_Object *list = NULL;
-static Evas_Object *main_win = NULL;
-static Elm_Object_Item *item = NULL;
-static Eina_Bool is_selected = EINA_FALSE;
-
-/**
- * @addtogroup elm_list
- * @{
- * @defgroup elm_list_item_selected_set elm_list_item_selected_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show a main window
- * @step 3 Create a list and add 7 items to it
- */
-
-static void
-setup(void)
-{
- unsigned int i;
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- {
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win != NULL)
- {
- evas_object_show(main_win);
- list = elm_list_add(main_win);
- if (list != NULL)
- {
- startup_status = EINA_TRUE;
- for (i = 0; i < labels_number; i++)
- {
- if (elm_list_item_append(list, labels[i], NULL, NULL, NULL, NULL) == NULL)
- {
- startup_status = EINA_FALSE;
- break;
- }
- }
- elm_list_select_mode_set(list, ELM_OBJECT_SELECT_MODE_ALWAYS);
- evas_object_show(list);
- }
- }
- }
-}
-
-static void
-teardown(void)
-{
- if (list != NULL)
- {
- evas_object_del(list);
- list = NULL;
- }
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-static Eina_Bool _set_timer_cb_p1(void* data)
-{
- elm_list_item_selected_set(item, EINA_TRUE);
- return ECORE_CALLBACK_CANCEL;
-}
-
-static Eina_Bool _set_timer_cb_p2(void* data)
-{
- elm_list_item_selected_set(item, EINA_FALSE);
- return ECORE_CALLBACK_CANCEL;
-}
-
-static Eina_Bool _get_and_quit_timer_cb_p(void *data)
-{
- is_selected = elm_list_item_selected_get(item);
- ecore_main_loop_quit();
- return ECORE_CALLBACK_CANCEL;
-}
-
-/**
- * @addtogroup elm_list_item_selected_set
- * @{
- * @objective: Positive test case checks that the tested function correctly sets selection status of the given list widget item.
- * @n Input Data:
- * @li the current list item;
- * @li selection status (EINA_TRUE or EINA_FALSE).
- *
- * @procedure
- * @step 1 Get first item of the given list widget.
- * @step 2 Set this item as selected.
- * @step 3 Get the selected status of the item.
- * @step 4 Set this item as unselected.
- * @step 5 Get the selected status of the item.
- *
- * @passcondition
- * In all cases the retrieved selection status of given item must be equal to the selection status which was set previously by tested function. Also, there is no segmentation fault.
- * @}
- */
-
-START_TEST(utc_elm_list_item_selected_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;
- }
-
- item = elm_list_first_item_get(list);
- if (item == NULL)
- {
- ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- ecore_timer_add(1, _set_timer_cb_p1, NULL);
- ecore_timer_add(2, _get_and_quit_timer_cb_p, NULL);
- ecore_main_loop_begin();
-
- if (is_selected == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- ecore_timer_add(1, _set_timer_cb_p2, NULL);
- ecore_timer_add(2, _get_and_quit_timer_cb_p, NULL);
- ecore_main_loop_begin();
-
- if (is_selected == EINA_TRUE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_list_item_selected_set
- * @{
- * @objective Negative test case checks situation if the argument of tested function is NULL.
- * @n Input Data:
- * @li the current list item (it will be replaced by NULL in the universal macro);
- * @li EINA_TRUE.
- *
- * @procedure
- * @step 1 Get first item of the given list widget.
- * @step 2 Use CREATE_CHECKED_ARGS_ARRAY macro for defining arguments of tested function which are subject to substitution for NULL.
- * @step 3 Call elm_list_item_selected_set with NULL params.
- *
- * @passcondition
- * There is no segmentation fault.
- * @}
- */
-START_TEST(utc_elm_list_item_selected_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;
- }
-
- CREATE_CHECKED_ARGS_ARRAY(1,0);
- UNITEST_FUNC_NEG_CA(elm_list_item_selected_set, NULL, EINA_TRUE);
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_list_item_selected_set()
-{
- TCase *tcase = tcase_create("utc_elm_list_item_selected_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_list_item_selected_set_p);
- tcase_add_test(tcase, utc_elm_list_item_selected_set_n);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-
-#include "../../utc_negative_unitest.h"
-
-static const int labels_number = 7;
-static const char *labels[] =
-{
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
-};
-
-static Eina_Bool startup_status = EINA_FALSE;
-static Evas_Object *list = NULL;
-static Evas_Object *main_win = NULL;
-
-/**
- * @addtogroup elm_list
- * @{
- * @defgroup elm_list_item_separator_get elm_list_item_separator_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show a main window
- * @step 3 Create a new list with 7 items
- */
-static void
-setup(void)
-{
- unsigned int i;
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- {
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win != NULL)
- {
- evas_object_show(main_win);
- list = elm_list_add(main_win);
- if (list != NULL)
- {
- startup_status = EINA_TRUE;
- for (i = 0; i < labels_number; i++)
- {
- if (elm_list_item_append(list, labels[i], NULL, NULL, NULL, NULL) == NULL)
- {
- startup_status = EINA_FALSE;
- break;
- }
- }
- elm_list_select_mode_set(list, ELM_OBJECT_SELECT_MODE_ALWAYS);
- }
- }
- }
-}
-
-static void
-teardown(void)
-{
- if (list != NULL)
- {
- evas_object_del(list);
- list = NULL;
- }
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_list_item_separator_get
- * @{
- * @objective: Positive test case checks if get-function, that gets information whether the item
- * is separator, works properly and doesn't cause segmentation fault.
- * @n Input Data: the current list item.
- *
- * @procedure
- * @step 1 Get first item of the given list widget.
- * @step 2 Mark this item as separator.
- * @step 3 Retrieve information that the given item is a separator.
- * @step 4 Mark this item as general (no separator).
- * @step 5 Retrieve information that the given item isn't a separator.
- *
- * @passcondition
- * In first case the tested function must return EINA_TRUE, and in second case it must return EINA_FALSE. Also, there is no segmentation fault.
- * @}
- */
-START_TEST(utc_elm_list_item_separator_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;
- }
-
- Elm_Object_Item *item = NULL;
- Eina_Bool ok = EINA_FALSE;
-
- item = elm_list_first_item_get(list);
- if (item == NULL)
- {
- ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- elm_list_item_separator_set(item, EINA_TRUE);
- if (elm_list_item_separator_get(item) == EINA_TRUE)
- {
- elm_list_item_separator_set(item, EINA_FALSE);
- if (elm_list_item_separator_get(item) == EINA_FALSE)
- {
- ok = EINA_TRUE;
- }
- }
-
- if (ok == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_list_item_separator_get
- * @{
- * @objective Negative test case checks if test function call with NULL instead of valid object (Elm_object_Item)
- * doesn't cause segmentation fault.
- * @n Input Data: the current list item (it will be replaced by NULL in the universal macro).
- *
- * @procedure
- * @step 1 Call function with NULL instead of the current list item.
- *
- * @passcondition
- * Tested function must return EINA_FALSE, and there is no segmentation fault.
- * @}
- */
-START_TEST(utc_elm_list_item_separator_get_n)
-{
- if (startup_status != EINA_TRUE)
- {
- ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
- return;
- }
-
- if (UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_list_item_separator_get, NULL) == TEST_FAIL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_list_item_separator_get()
-{
- TCase *tcase = tcase_create("utc_elm_list_item_separator_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_list_item_separator_get_p);
- tcase_add_test(tcase, utc_elm_list_item_separator_get_n);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+
+#include "../../utc_negative_unitest.h"
+
+static const int labels_number = 7;
+static const char *labels[] =
+{
+ "Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday"
+};
+
+static Eina_Bool startup_status = EINA_FALSE;
+static Evas_Object *list = NULL;
+static Evas_Object *main_win = NULL;
+
+/**
+ * @addtogroup elm_list
+ * @{
+ * @defgroup elm_list_item_separator_get elm_list_item_separator_get()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show a main window
+ * @step 3 Create a new list with 7 items
+ */
+static void
+setup(void)
+{
+ unsigned int i;
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ {
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win != NULL)
+ {
+ evas_object_show(main_win);
+ list = elm_list_add(main_win);
+ if (list != NULL)
+ {
+ startup_status = EINA_TRUE;
+ for (i = 0; i < labels_number; i++)
+ {
+ if (elm_list_item_append(list, labels[i], NULL, NULL, NULL, NULL) == NULL)
+ {
+ startup_status = EINA_FALSE;
+ break;
+ }
+ }
+ elm_list_select_mode_set(list, ELM_OBJECT_SELECT_MODE_ALWAYS);
+ }
+ }
+ }
+}
+
+static void
+teardown(void)
+{
+ if (list != NULL)
+ {
+ evas_object_del(list);
+ list = NULL;
+ }
+ if (main_win != NULL)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_list_item_separator_get
+ * @{
+ * @objective: Positive test case checks if get-function, that gets information whether the item
+ * is separator, works properly and doesn't cause segmentation fault.
+ * @n Input Data: the current list item.
+ *
+ * @procedure
+ * @step 1 Get first item of the given list widget.
+ * @step 2 Mark this item as separator.
+ * @step 3 Retrieve information that the given item is a separator.
+ * @step 4 Mark this item as general (no separator).
+ * @step 5 Retrieve information that the given item isn't a separator.
+ *
+ * @passcondition
+ * In first case the tested function must return EINA_TRUE, and in second case it must return EINA_FALSE. Also, there is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_elm_list_item_separator_get_p)
+{
+ if (startup_status != EINA_TRUE)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+ }
+
+ Elm_Object_Item *item = NULL;
+ Eina_Bool ok = EINA_FALSE;
+
+ item = elm_list_first_item_get(list);
+ if (item == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ elm_list_item_separator_set(item, EINA_TRUE);
+ if (elm_list_item_separator_get(item) == EINA_TRUE)
+ {
+ elm_list_item_separator_set(item, EINA_FALSE);
+ if (elm_list_item_separator_get(item) == EINA_FALSE)
+ {
+ ok = EINA_TRUE;
+ }
+ }
+
+ if (ok == EINA_FALSE)
+ {
+ 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_list_item_separator_get
+ * @{
+ * @objective Negative test case checks if test function call with NULL instead of valid object (Elm_object_Item)
+ * doesn't cause segmentation fault.
+ * @n Input Data: the current list item (it will be replaced by NULL in the universal macro).
+ *
+ * @procedure
+ * @step 1 Call function with NULL instead of the current list item.
+ *
+ * @passcondition
+ * Tested function must return EINA_FALSE, and there is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_elm_list_item_separator_get_n)
+{
+
+ if (UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_list_item_separator_get, NULL) == TEST_FAIL)
+ {
+ 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_list_item_separator_set
+ * @{
+ * @objective Negative test case checks if test function call with NULL instead of valid object (Elm_object_Item)
+ * doesn't cause segmentation fault.
+ * @n Input Data:
+ * @li the current list item (it will be replaced by NULL in the universal macro);
+ * @li EINA_TRUE.
+ *
+ * @procedure
+ * @step 1 Call test function with NULL instead of the separator object.
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_elm_list_item_separator_set_n)
+{
+
+ CREATE_CHECKED_ARGS_ARRAY(1, 0);
+ UNITEST_FUNC_NEG_CA(elm_list_item_separator_set, NULL, EINA_TRUE);
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_list_item_separator_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_list_item_separator_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_list_item_separator_get_p);
+ tcase_add_test(tcase, utc_elm_list_item_separator_get_n);
+ tcase_add_test(tcase, utc_elm_list_item_separator_set_n);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-
-#include "../../utc_negative_unitest.h"
-
-static const int labels_number = 7;
-static const char *labels[] =
-{
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
-};
-
-static Eina_Bool startup_status = EINA_FALSE;
-static Evas_Object *list = NULL;
-static Evas_Object *main_win = NULL;
-
-/**
- * @addtogroup elm_list
- * @{
- * @defgroup elm_list_item_separator_set elm_list_item_separator_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show a main window
- * @step 3 Create a new list with 7 items
- */
-static void
-setup(void)
-{
- unsigned int i;
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- {
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win != NULL)
- {
- evas_object_show(main_win);
- list = elm_list_add(main_win);
- if (list != NULL)
- {
- startup_status = EINA_TRUE;
- for (i = 0; i < labels_number; i++)
- {
- if (elm_list_item_append(list, labels[i], NULL, NULL, NULL, NULL) == NULL)
- {
- startup_status = EINA_FALSE;
- break;
- }
- }
- elm_list_select_mode_set(list, ELM_OBJECT_SELECT_MODE_ALWAYS);
- }
- }
- }
-}
-
-static void
-teardown(void)
-{
- if (list != NULL)
- {
- evas_object_del(list);
- list = NULL;
- }
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_list_item_separator_set
- * @{
- * @objective: Positive test case checks if set-function that sets item as separator works properly
- * and doesn't cause segmentation fault.
- * @n Input Data: the current list item.
- *
- * @procedure
- * @step 1 Get first item of the given list widget.
- * @step 2 Mark this item as separator.
- * @step 3 Retrieve information that the given item is a separator.
- * @step 4 Mark this item as general (no separator).
- * @step 5 Retrieve information that the given item isn't a separator.
- *
- * @passcondition
- * In all cases the retrieved separator status of given item must be equal to the separator status which was set previously by tested function. Also, there is no segmentation fault.
- * @}
- */
-START_TEST(utc_elm_list_item_separator_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;
- }
-
- Elm_Object_Item *item = NULL;
- Eina_Bool ok = EINA_FALSE;
-
- item = elm_list_first_item_get(list);
- if (item == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- elm_list_item_separator_set(item, EINA_TRUE);
- if (elm_list_item_separator_get(item) == EINA_TRUE)
- {
- elm_list_item_separator_set(item, EINA_FALSE);
- if (elm_list_item_separator_get(item) == EINA_FALSE)
- {
- ok = EINA_TRUE;
- }
- }
-
- if (ok == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_list_item_separator_set
- * @{
- * @objective Negative test case checks if test function call with NULL instead of valid object (Elm_object_Item)
- * doesn't cause segmentation fault.
- * @n Input Data:
- * @li the current list item (it will be replaced by NULL in the universal macro);
- * @li EINA_TRUE.
- *
- * @procedure
- * @step 1 Call test function with NULL instead of the separator object.
- *
- * @passcondition
- * There is no segmentation fault.
- * @}
- */
-START_TEST(utc_elm_list_item_separator_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;
- }
-
- CREATE_CHECKED_ARGS_ARRAY(1, 0);
- UNITEST_FUNC_NEG_CA(elm_list_item_separator_set, NULL, EINA_TRUE);
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_list_item_separator_set()
-{
- TCase *tcase = tcase_create("utc_elm_list_item_separator_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_list_item_separator_set_p);
- tcase_add_test(tcase, utc_elm_list_item_separator_set_n);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-
-#include "../../utc_negative_unitest.h"
-
-static const int labels_number = 7;
-static const char *labels[] =
-{
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
-};
-
-static Eina_Bool startup_status = EINA_FALSE;
-static Evas_Object *list = NULL;
-static Evas_Object *main_win = NULL;
-
-/**
- * @addtogroup elm_list
- * @{
- * @defgroup elm_list_mode_get elm_list_mode_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show a main window
- * @step 3 Create a new list with 7 items
- */
-static void
-setup(void)
-{
- unsigned int i;
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- {
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win != NULL)
- {
- evas_object_show(main_win);
- list = elm_list_add(main_win);
- if (list != NULL)
- {
- startup_status = EINA_TRUE;
- for (i = 0; i < labels_number; i++)
- {
- if (elm_list_item_append(list, labels[i], NULL, NULL, NULL, NULL) == NULL)
- {
- startup_status = EINA_FALSE;
- break;
- }
- }
- elm_list_select_mode_set(list, ELM_OBJECT_SELECT_MODE_ALWAYS);
- }
- }
- }
-}
-
-static void
-teardown(void)
-{
- if (list != NULL)
- {
- evas_object_del(list);
- list = NULL;
- }
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_list_mode_get
- * @{
- * @objective: Positive test case checks that the tested function correctly retrieves current mode of the given list widget.
- * @n Input Data: the current list widget.
- *
- * @procedure
- * @step 1 Set mode for the given list widget as ELM_LIST_SCROLL.
- * @step 2 Get mode for the given list widget.
- * @step 3 Compare retrieved mode with mode which was set previously.
- * @step 4 Set mode for the given list widget as ELM_LIST_LIMIT.
- * @step 5 Get mode for the given list widget.
- * @step 6 Compare retrieved mode with mode which was set previously.
- * @step 7 Set mode for the given list widget as ELM_LIST_EXPAND.
- * @step 8 Get mode for the given list widget.
- * @step 9 Compare retrieved mode with mode which was set previously.
- * @step 10 Set mode for the given list widget as ELM_LIST_LAST.
- * @step 11 Get mode for the given list widget.
- * @step 12 Compare retrieved mode with mode which was set previously.
- *
- * @passcondition
- * In all cases the retrieved mode of given item must be equal to the mode which was set previously by tested function. Also, there is no segmentation fault.
- * @}
- */
-START_TEST(utc_elm_list_mode_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;
- }
-
- Elm_List_Mode ret_mode;
-
- elm_list_mode_set(list, ELM_LIST_SCROLL);
- ret_mode = elm_list_mode_get(list);
- if (ret_mode != ELM_LIST_SCROLL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- elm_list_mode_set(list, ELM_LIST_LIMIT);
- ret_mode = elm_list_mode_get(list);
- if (ret_mode != ELM_LIST_LIMIT)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- elm_list_mode_set(list, ELM_LIST_EXPAND);
- ret_mode = elm_list_mode_get(list);
- if (ret_mode != ELM_LIST_EXPAND)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- elm_list_mode_set(list, ELM_LIST_LAST);
- ret_mode = elm_list_mode_get(list);
- if (ret_mode != ELM_LIST_LAST)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_list_mode_get
- * @{
- * @objective Negative test case checks situation if the argument of tested function is NULL.
- * @n Input Data: the current list widget (it will be replaced by NULL in the universal macro).
- *
- * @procedure
- * @step 1 Call function with NULL instead of the list widget.
- *
- * @passcondition
- * Tested function must return ELM_LIST_COMPRESS, and there is no segmentation fault.
- * @}
- */
-#ifdef NOT_APPROVED_FOR_BUILD
-START_TEST(utc_elm_list_mode_get_n)
-{
- if (startup_status != EINA_TRUE)
- {
- ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
- return;
- }
-
- if (UNITEST_FUNC_NEG_RET(ELM_LIST_COMPRESS, elm_list_mode_get, list) == TEST_FAIL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-#endif
-
-/**
- *@}
- */
-
-TCase * _utc_elm_list_mode_get()
-{
- TCase *tcase = tcase_create("utc_elm_list_mode_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
-#ifdef NOT_APPROVED_FOR_BUILD
-#endif
- tcase_add_test(tcase, utc_elm_list_mode_get_p);
-#ifdef NOT_APPROVED_FOR_BUILD
- tcase_add_test(tcase, utc_elm_list_mode_get_n);
-#endif
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+
+#include "../../utc_negative_unitest.h"
+
+static const int labels_number = 7;
+static const char *labels[] =
+{
+ "Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday"
+};
+
+static Eina_Bool startup_status = EINA_FALSE;
+static Evas_Object *list = NULL;
+static Evas_Object *main_win = NULL;
+
+/**
+ * @addtogroup elm_list
+ * @{
+ * @defgroup elm_list_mode_get elm_list_mode_get()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show a main window
+ * @step 3 Create a new list with 7 items
+ */
+static void
+setup(void)
+{
+ unsigned int i;
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ {
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win != NULL)
+ {
+ evas_object_show(main_win);
+ list = elm_list_add(main_win);
+ if (list != NULL)
+ {
+ startup_status = EINA_TRUE;
+ for (i = 0; i < labels_number; i++)
+ {
+ if (elm_list_item_append(list, labels[i], NULL, NULL, NULL, NULL) == NULL)
+ {
+ startup_status = EINA_FALSE;
+ break;
+ }
+ }
+ elm_list_select_mode_set(list, ELM_OBJECT_SELECT_MODE_ALWAYS);
+ }
+ }
+ }
+}
+
+static void
+teardown(void)
+{
+ if (list != NULL)
+ {
+ evas_object_del(list);
+ list = NULL;
+ }
+ if (main_win != NULL)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_list_mode_get
+ * @{
+ * @objective: Positive test case checks that the tested function correctly retrieves current mode of the given list widget.
+ * @n Input Data: the current list widget.
+ *
+ * @procedure
+ * @step 1 Set mode for the given list widget as ELM_LIST_SCROLL.
+ * @step 2 Get mode for the given list widget.
+ * @step 3 Compare retrieved mode with mode which was set previously.
+ * @step 4 Set mode for the given list widget as ELM_LIST_LIMIT.
+ * @step 5 Get mode for the given list widget.
+ * @step 6 Compare retrieved mode with mode which was set previously.
+ * @step 7 Set mode for the given list widget as ELM_LIST_EXPAND.
+ * @step 8 Get mode for the given list widget.
+ * @step 9 Compare retrieved mode with mode which was set previously.
+ * @step 10 Set mode for the given list widget as ELM_LIST_LAST.
+ * @step 11 Get mode for the given list widget.
+ * @step 12 Compare retrieved mode with mode which was set previously.
+ *
+ * @passcondition
+ * In all cases the retrieved mode of given item must be equal to the mode which was set previously by tested function. Also, there is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_elm_list_mode_get_p)
+{
+ if (startup_status != EINA_TRUE)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+ }
+
+ Elm_List_Mode ret_mode;
+
+ elm_list_mode_set(list, ELM_LIST_SCROLL);
+ ret_mode = elm_list_mode_get(list);
+ if (ret_mode != ELM_LIST_SCROLL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ elm_list_mode_set(list, ELM_LIST_LIMIT);
+ ret_mode = elm_list_mode_get(list);
+ if (ret_mode != ELM_LIST_LIMIT)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ elm_list_mode_set(list, ELM_LIST_EXPAND);
+ ret_mode = elm_list_mode_get(list);
+ if (ret_mode != ELM_LIST_EXPAND)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ elm_list_mode_set(list, ELM_LIST_LAST);
+ ret_mode = elm_list_mode_get(list);
+ if (ret_mode != ELM_LIST_LAST)
+ {
+ 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_list_mode_get
+ * @{
+ * @objective Negative test case checks situation if the argument of tested function is NULL.
+ * @n Input Data: the current list widget (it will be replaced by NULL in the universal macro).
+ *
+ * @procedure
+ * @step 1 Call function with NULL instead of the list widget.
+ *
+ * @passcondition
+ * Tested function must return ELM_LIST_COMPRESS, and there is no segmentation fault.
+ * @}
+ */
+#ifdef NOT_APPROVED_FOR_BUILD
+START_TEST(utc_elm_list_mode_get_n)
+{
+
+ if (UNITEST_FUNC_NEG_RET(ELM_LIST_COMPRESS, elm_list_mode_get, list) == TEST_FAIL)
+ {
+ 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
+#endif
+
+/**
+ * @addtogroup elm_list_mode_set
+ * @{
+ * @objective Negative test case checks situation if the arguments of tested function become incorrect.
+ * @n Input Data:
+ * @li the current list widget (it will be replaced by NULL);
+ * @li new mode (it will be replaced by -100).
+ *
+ * @procedure
+ * @step 1 Call tested function with NULL instead of first argument.
+ * @step 2 Call tested function with -100 instead of second argument.
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_elm_list_mode_set_n)
+{
+
+ elm_list_mode_set(NULL, ELM_LIST_LAST);
+ elm_list_mode_set(list, -100);
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_list_mode_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_list_mode_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+
+ tcase_add_test(tcase, utc_elm_list_mode_get_p);
+#ifdef NOT_APPROVED_FOR_BUILD
+ tcase_add_test(tcase, utc_elm_list_mode_get_n);
+#endif
+ tcase_add_test(tcase, utc_elm_list_mode_set_n);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-
-static const int labels_number = 7;
-static const char *labels[] =
-{
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
-};
-
-static Eina_Bool startup_status = EINA_FALSE;
-static Evas_Object *list = NULL;
-static Evas_Object *main_win = NULL;
-
-/**
- * @addtogroup elm_list
- * @{
- * @defgroup elm_list_mode_set elm_list_mode_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show a main window
- * @step 3 Create a new list with 7 items
- */
-static void
-setup(void)
-{
- unsigned int i;
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- {
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win != NULL)
- {
- evas_object_show(main_win);
- list = elm_list_add(main_win);
- if (list != NULL)
- {
- startup_status = EINA_TRUE;
- for (i = 0; i < labels_number; i++)
- {
- if (elm_list_item_append(list, labels[i], NULL, NULL, NULL, NULL) == NULL)
- {
- startup_status = EINA_FALSE;
- break;
- }
- }
- elm_list_select_mode_set(list, ELM_OBJECT_SELECT_MODE_ALWAYS);
- }
- }
- }
-}
-
-static void
-teardown(void)
-{
- if (list != NULL)
- {
- evas_object_del(list);
- list = NULL;
- }
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_list_mode_set
- * @{
- * @objective: Positive test case checks that the tested function correctly sets current mode of the given list widget.
- * @n Input Data:
- * @li the current list widget;
- * @li new mode.
- *
- * @procedure
- * @step 1 Set mode for the given list widget as ELM_LIST_SCROLL.
- * @step 2 Get mode for the given list widget.
- * @step 3 Compare retrieved mode with mode which was set previously.
- * @step 4 Set mode for the given list widget as ELM_LIST_LIMIT.
- * @step 5 Get mode for the given list widget.
- * @step 6 Compare retrieved mode with mode which was set previously.
- * @step 7 Set mode for the given list widget as ELM_LIST_EXPAND.
- * @step 8 Get mode for the given list widget.
- * @step 9 Compare retrieved mode with mode which was set previously.
- * @step 10 Set mode for the given list widget as ELM_LIST_LAST.
- * @step 11 Get mode for the given list widget.
- * @step 12 Compare retrieved mode with mode which was set previously.
- *
- * @passcondition
- * In all cases the retrieved mode of given item must be equal to the mode which was set previously by tested function. Also, there is no segmentation fault.
- * @}
- */
-START_TEST(utc_elm_list_mode_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;
- }
-
- Elm_List_Mode ret_mode;
-
- elm_list_mode_set(list, ELM_LIST_SCROLL);
- ret_mode = elm_list_mode_get(list);
- if (ret_mode != ELM_LIST_SCROLL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- elm_list_mode_set(list, ELM_LIST_LIMIT);
- ret_mode = elm_list_mode_get(list);
- if (ret_mode != ELM_LIST_LIMIT)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- elm_list_mode_set(list, ELM_LIST_EXPAND);
- ret_mode = elm_list_mode_get(list);
- if (ret_mode != ELM_LIST_EXPAND)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- elm_list_mode_set(list, ELM_LIST_LAST);
- ret_mode = elm_list_mode_get(list);
- if (ret_mode != ELM_LIST_LAST)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_list_mode_set
- * @{
- * @objective Negative test case checks situation if the arguments of tested function become incorrect.
- * @n Input Data:
- * @li the current list widget (it will be replaced by NULL);
- * @li new mode (it will be replaced by -100).
- *
- * @procedure
- * @step 1 Call tested function with NULL instead of first argument.
- * @step 2 Call tested function with -100 instead of second argument.
- *
- * @passcondition
- * There is no segmentation fault.
- * @}
- */
-START_TEST(utc_elm_list_mode_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;
- }
-
- elm_list_mode_set(NULL, ELM_LIST_LAST);
- elm_list_mode_set(list, -100);
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_list_mode_set()
-{
- TCase *tcase = tcase_create("utc_elm_list_mode_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_list_mode_set_p);
- tcase_add_test(tcase, utc_elm_list_mode_set_n);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-
-#include "../../utc_negative_unitest.h"
-
-static const int labels_number = 7;
-static const char *labels[] =
-{
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
-};
-
-static Eina_Bool startup_status = EINA_FALSE;
-static Evas_Object *list = NULL;
-static Evas_Object *main_win = NULL;
-
-/**
- * @addtogroup elm_list
- * @{
- * @defgroup elm_list_multi_select_get elm_list_multi_select_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show a main window
- * @step 3 Create a new list with 7 items
- */
-static void
-setup(void)
-{
- unsigned int i;
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- {
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win != NULL)
- {
- evas_object_show(main_win);
- list = elm_list_add(main_win);
- if (list != NULL)
- {
- startup_status = EINA_TRUE;
- for (i = 0; i < labels_number; i++)
- {
- if (elm_list_item_append(list, labels[i], NULL, NULL, NULL, NULL) == NULL)
- {
- startup_status = EINA_FALSE;
- break;
- }
- }
- elm_list_select_mode_set(list, ELM_OBJECT_SELECT_MODE_ALWAYS);
- }
- }
- }
-}
-
-static void
-teardown(void)
-{
- if (list != NULL)
- {
- evas_object_del(list);
- list = NULL;
- }
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_list_multi_select_get
- * @{
- * @objective: Positive test case checks that the tested function enables and disables the multi-select mode for given list widget.
- * @n Input Data: the given list widget.
- *
- * @procedure
- * @step 1 Set multi-select mode as EINA_TRUE.
- * @step 2 Get multi-select mode.
- * @step 3 Set multi-select mode as EINA_FALSE.
- * @step 4 Get multi-select mode.
- *
- * @passcondition
- * In both cases the retrieved value of multi-select mode must be equal to the value which was set previously. Also, there is no segmentation fault.
- * @}
- */
-START_TEST(utc_elm_list_multi_select_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;
- }
-
- Eina_Bool ok = EINA_FALSE;
-
- elm_list_multi_select_set(list, EINA_TRUE);
- if (elm_list_multi_select_get(list) == EINA_TRUE)
- {
- elm_list_multi_select_set(list, EINA_FALSE);
- if (elm_list_multi_select_get(list) == EINA_FALSE)
- {
- ok = EINA_TRUE;
- }
- }
-
- if (ok != EINA_TRUE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_list_multi_select_get
- * @{
- * @objective Negative test case checks situation if the argument of tested function is NULL.
- * @n Input Data: the given list widget (it will be replaced by NULL in the universal macro).
- *
- * @procedure
- * @step 1 Call function with NULL instead of the list widget.
- *
- * @passcondition
- * Tested function must return EINA_FALSE, and there is no segmentation fault.
- * @}
- */
-START_TEST(utc_elm_list_multi_select_get_n)
-{
- if (startup_status != EINA_TRUE)
- {
- ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
- return;
- }
-
- if (UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_list_multi_select_get, list) == TEST_FAIL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_list_multi_select_get()
-{
- TCase *tcase = tcase_create("utc_elm_list_multi_select_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_list_multi_select_get_p);
- tcase_add_test(tcase, utc_elm_list_multi_select_get_n);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+
+#include "../../utc_negative_unitest.h"
+
+static const int labels_number = 7;
+static const char *labels[] =
+{
+ "Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday"
+};
+
+static Eina_Bool startup_status = EINA_FALSE;
+static Evas_Object *list = NULL;
+static Evas_Object *main_win = NULL;
+
+/**
+ * @addtogroup elm_list
+ * @{
+ * @defgroup elm_list_multi_select_get elm_list_multi_select_get()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show a main window
+ * @step 3 Create a new list with 7 items
+ */
+static void
+setup(void)
+{
+ unsigned int i;
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ {
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win != NULL)
+ {
+ evas_object_show(main_win);
+ list = elm_list_add(main_win);
+ if (list != NULL)
+ {
+ startup_status = EINA_TRUE;
+ for (i = 0; i < labels_number; i++)
+ {
+ if (elm_list_item_append(list, labels[i], NULL, NULL, NULL, NULL) == NULL)
+ {
+ startup_status = EINA_FALSE;
+ break;
+ }
+ }
+ elm_list_select_mode_set(list, ELM_OBJECT_SELECT_MODE_ALWAYS);
+ }
+ }
+ }
+}
+
+static void
+teardown(void)
+{
+ if (list != NULL)
+ {
+ evas_object_del(list);
+ list = NULL;
+ }
+ if (main_win != NULL)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_list_multi_select_get
+ * @{
+ * @objective: Positive test case checks that the tested function enables and disables the multi-select mode for given list widget.
+ * @n Input Data: the given list widget.
+ *
+ * @procedure
+ * @step 1 Set multi-select mode as EINA_TRUE.
+ * @step 2 Get multi-select mode.
+ * @step 3 Set multi-select mode as EINA_FALSE.
+ * @step 4 Get multi-select mode.
+ *
+ * @passcondition
+ * In both cases the retrieved value of multi-select mode must be equal to the value which was set previously. Also, there is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_elm_list_multi_select_get_p)
+{
+ if (startup_status != EINA_TRUE)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+ }
+
+ Eina_Bool ok = EINA_FALSE;
+
+ elm_list_multi_select_set(list, EINA_TRUE);
+ if (elm_list_multi_select_get(list) == EINA_TRUE)
+ {
+ elm_list_multi_select_set(list, EINA_FALSE);
+ if (elm_list_multi_select_get(list) == EINA_FALSE)
+ {
+ ok = EINA_TRUE;
+ }
+ }
+
+ if (ok != EINA_TRUE)
+ {
+ 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_list_multi_select_get
+ * @{
+ * @objective Negative test case checks situation if the argument of tested function is NULL.
+ * @n Input Data: the given list widget (it will be replaced by NULL in the universal macro).
+ *
+ * @procedure
+ * @step 1 Call function with NULL instead of the list widget.
+ *
+ * @passcondition
+ * Tested function must return EINA_FALSE, and there is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_elm_list_multi_select_get_n)
+{
+
+ if (UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_list_multi_select_get, list) == TEST_FAIL)
+ {
+ 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_list_multi_select_set
+ * @{
+ * @objective Negative test case checks situation if all arguments of tested function become NULL in turn.
+ * @n Input Data:
+ * @li the given list widget (it will be replaced by NULL in the universal macro);
+ * @li EINA_TRUE.
+ *
+ * @procedure
+ * @step 1 Use CREATE_CHECKED_ARGS_ARRAY macro for defining arguments of tested function which are subject to substitution for NULL.
+ * @step 2 Call function with NULL instead of the list widget.
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_elm_list_multi_select_set_n)
+{
+
+ CREATE_CHECKED_ARGS_ARRAY(1,0);
+ UNITEST_FUNC_NEG_CA(elm_list_multi_select_set, list, EINA_TRUE);
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_list_multi_select_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_list_multi_select_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_list_multi_select_get_p);
+ tcase_add_test(tcase, utc_elm_list_multi_select_get_n);
+ tcase_add_test(tcase, utc_elm_list_multi_select_set_n);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-
-#include "../../utc_negative_unitest.h"
-
-static const int labels_number = 7;
-static const char *labels[] =
-{
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
-};
-
-static Eina_Bool startup_status = EINA_FALSE;
-static Evas_Object *list = NULL;
-static Evas_Object *main_win = NULL;
-
-/**
- * @addtogroup elm_list
- * @{
- * @defgroup elm_list_multi_select_set elm_list_multi_select_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show a main window
- * @step 3 Create a new list with 7 items
- */
-static void
-setup(void)
-{
- unsigned int i;
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- {
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win != NULL)
- {
- evas_object_show(main_win);
- list = elm_list_add(main_win);
- if (list != NULL)
- {
- startup_status = EINA_TRUE;
- for (i = 0; i < labels_number; i++)
- {
- if (elm_list_item_append(list, labels[i], NULL, NULL, NULL, NULL) == NULL)
- {
- startup_status = EINA_FALSE;
- break;
- }
- }
- elm_list_select_mode_set(list, ELM_OBJECT_SELECT_MODE_ALWAYS);
- }
- }
- }
-}
-
-static void
-teardown(void)
-{
- if (list != NULL)
- {
- evas_object_del(list);
- list = NULL;
- }
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_list_multi_select_set
- * @{
- * @objective: Positive test case checks that the tested function sets the multi-select mode for given list widget.
- * @n Input Data:
- * @li the given list widget;
- * @li value of multi-select mode.
- *
- * @procedure
- * @step 1 Set multi-select mode as EINA_TRUE.
- * @step 2 Get multi-select mode.
- * @step 3 Set multi-select mode as EINA_FALSE.
- * @step 4 Get multi-select mode.
- *
- * @passcondition
- * In both cases the retrieved value of multi-select mode must be equal to the value which was set previously. Also, there is no segmentation fault.
- * @}
- */
-START_TEST(utc_elm_list_multi_select_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;
- }
-
- Eina_Bool ok = EINA_FALSE;
-
- elm_list_multi_select_set(list, EINA_TRUE);
- if (elm_list_multi_select_get(list) == EINA_TRUE)
- {
- elm_list_multi_select_set(list, EINA_FALSE);
- if (elm_list_multi_select_get(list) == EINA_FALSE)
- {
- ok = EINA_TRUE;
- }
- }
-
- if (ok != EINA_TRUE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_list_multi_select_set
- * @{
- * @objective Negative test case checks situation if all arguments of tested function become NULL in turn.
- * @n Input Data:
- * @li the given list widget (it will be replaced by NULL in the universal macro);
- * @li EINA_TRUE.
- *
- * @procedure
- * @step 1 Use CREATE_CHECKED_ARGS_ARRAY macro for defining arguments of tested function which are subject to substitution for NULL.
- * @step 2 Call function with NULL instead of the list widget.
- *
- * @passcondition
- * There is no segmentation fault.
- * @}
- */
-START_TEST(utc_elm_list_multi_select_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;
- }
-
- CREATE_CHECKED_ARGS_ARRAY(1,0);
- UNITEST_FUNC_NEG_CA(elm_list_multi_select_set, list, EINA_TRUE);
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_list_multi_select_set()
-{
- TCase *tcase = tcase_create("utc_elm_list_multi_select_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_list_multi_select_set_p);
- tcase_add_test(tcase, utc_elm_list_multi_select_set_n);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-
-#include "../../utc_negative_unitest.h"
-
-static const int labels_number = 7;
-static const char *labels[] =
-{
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
-};
-
-static Eina_Bool startup_status = EINA_FALSE;
-static Evas_Object *list = NULL;
-static Evas_Object *main_win = NULL;
-
-/**
- * @addtogroup elm_list
- * @{
- * @defgroup elm_list_select_mode_get elm_list_select_mode_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show a main window
- * @step 3 Create a new list with 7 items
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- unsigned int i = 0;
- UTC_ELM_INIT();
- {
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win != NULL)
- {
- evas_object_show(main_win);
- list = elm_list_add(main_win);
- if (list != NULL)
- {
- startup_status = EINA_TRUE;
- for (i = 0; i < labels_number; i++)
- {
- if (elm_list_item_append(list, labels[i], NULL, NULL, NULL, NULL) == NULL)
- {
- startup_status = EINA_FALSE;
- break;
- }
- }
- }
- }
- }
-}
-
-static void
-teardown(void)
-{
- if (list != NULL)
- {
- evas_object_del(list);
- list = NULL;
- }
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_list_select_mode_get
- * @{
- * @objective: Positive test case checks that the tested function correctly retrieves current selection mode of the given list widget.
- * @n Input Data: the current list widget.
- *
- * @procedure
- * @step 1 Set selection mode for the given list widget as ELM_OBJECT_SELECT_MODE_ALWAYS.
- * @step 2 Get selection mode for the given list widget.
- * @step 3 Compare retrieved mode with mode which was set previously.
- * @step 4 Set selection mode for the given list widget as ELM_OBJECT_SELECT_MODE_NONE.
- * @step 5 Get selection mode for the given list widget.
- * @step 6 Compare retrieved mode with mode which was set previously.
- * @step 7 Set selection mode for the given list widget as ELM_OBJECT_SELECT_MODE_DEFAULT.
- * @step 8 Get selection mode for the given list widget.
- * @step 9 Compare retrieved mode with mode which was set previously.
- *
- * @passcondition
- * In all cases the retrieved mode of given item must be equal to the mode which was set previously by tested function. Also, there is no segmentation fault.
- * @}
- */
-START_TEST(utc_elm_list_select_mode_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;
- }
-
- Elm_Object_Select_Mode ret_mode;
-
- elm_list_select_mode_set(list, ELM_OBJECT_SELECT_MODE_ALWAYS);
- ret_mode = elm_list_select_mode_get(list);
- if (ret_mode != ELM_OBJECT_SELECT_MODE_ALWAYS)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. mode ELM_OBJECT_SELECT_MODE_ALWAYS not set", __FILE__, __LINE__);
- return;
- }
-
- elm_list_select_mode_set(list, ELM_OBJECT_SELECT_MODE_NONE);
- ret_mode = elm_list_select_mode_get(list);
- if (ret_mode != ELM_OBJECT_SELECT_MODE_NONE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. mode ELM_OBJECT_SELECT_MODE_NONE not set", __FILE__, __LINE__);
- return;
- }
-
- elm_list_select_mode_set(list, ELM_OBJECT_SELECT_MODE_DEFAULT);
- ret_mode = elm_list_select_mode_get(list);
- if (ret_mode != ELM_OBJECT_SELECT_MODE_DEFAULT)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. mode ELM_OBJECT_SELECT_MODE_DEFAULT not set", __FILE__, __LINE__);
- return;
- }
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_list_select_mode_get
- * @{
- * @objective Negative test case checks situation if the argument of tested function is NULL.
- * @n Input Data: the current list widget (it will be replaced by NULL in the universal macro).
- *
- * @procedure
- * @step 1 Call function with NULL instead of the list widget.
- *
- * @passcondition
- * Tested function must return ELM_OBJECT_SELECT_MODE_MAX , and there is no segmentation fault.
- * @}
- */
-START_TEST(utc_elm_list_select_mode_get_n)
-{
- if (startup_status != EINA_TRUE)
- {
- ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
- return;
- }
-
- if (UNITEST_FUNC_NEG_RET(ELM_OBJECT_SELECT_MODE_MAX, elm_list_select_mode_get, list) == TEST_FAIL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_list_select_mode_get()
-{
- TCase *tcase = tcase_create("utc_elm_list_select_mode_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_list_select_mode_get_p);
- tcase_add_test(tcase, utc_elm_list_select_mode_get_n);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+
+#include "../../utc_negative_unitest.h"
+
+static const int labels_number = 7;
+static const char *labels[] =
+{
+ "Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday"
+};
+
+static Eina_Bool startup_status = EINA_FALSE;
+static Evas_Object *list = NULL;
+static Evas_Object *main_win = NULL;
+
+/**
+ * @addtogroup elm_list
+ * @{
+ * @defgroup elm_list_select_mode_get elm_list_select_mode_get()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show a main window
+ * @step 3 Create a new list with 7 items
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ unsigned int i = 0;
+ UTC_ELM_INIT();
+ {
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win != NULL)
+ {
+ evas_object_show(main_win);
+ list = elm_list_add(main_win);
+ if (list != NULL)
+ {
+ startup_status = EINA_TRUE;
+ for (i = 0; i < labels_number; i++)
+ {
+ if (elm_list_item_append(list, labels[i], NULL, NULL, NULL, NULL) == NULL)
+ {
+ startup_status = EINA_FALSE;
+ break;
+ }
+ }
+ }
+ }
+ }
+}
+
+static void
+teardown(void)
+{
+ if (list != NULL)
+ {
+ evas_object_del(list);
+ list = NULL;
+ }
+ if (main_win != NULL)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_list_select_mode_get
+ * @{
+ * @objective: Positive test case checks that the tested function correctly retrieves current selection mode of the given list widget.
+ * @n Input Data: the current list widget.
+ *
+ * @procedure
+ * @step 1 Set selection mode for the given list widget as ELM_OBJECT_SELECT_MODE_ALWAYS.
+ * @step 2 Get selection mode for the given list widget.
+ * @step 3 Compare retrieved mode with mode which was set previously.
+ * @step 4 Set selection mode for the given list widget as ELM_OBJECT_SELECT_MODE_NONE.
+ * @step 5 Get selection mode for the given list widget.
+ * @step 6 Compare retrieved mode with mode which was set previously.
+ * @step 7 Set selection mode for the given list widget as ELM_OBJECT_SELECT_MODE_DEFAULT.
+ * @step 8 Get selection mode for the given list widget.
+ * @step 9 Compare retrieved mode with mode which was set previously.
+ *
+ * @passcondition
+ * In all cases the retrieved mode of given item must be equal to the mode which was set previously by tested function. Also, there is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_elm_list_select_mode_get_p)
+{
+ if (startup_status != EINA_TRUE)
+ {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (startup was been executed unsuccessfully)..", __FILE__, __LINE__);
+ }
+
+ Elm_Object_Select_Mode ret_mode;
+
+ elm_list_select_mode_set(list, ELM_OBJECT_SELECT_MODE_ALWAYS);
+ ret_mode = elm_list_select_mode_get(list);
+ if (ret_mode != ELM_OBJECT_SELECT_MODE_ALWAYS)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. mode ELM_OBJECT_SELECT_MODE_ALWAYS not set", __FILE__, __LINE__);
+ }
+
+ elm_list_select_mode_set(list, ELM_OBJECT_SELECT_MODE_NONE);
+ ret_mode = elm_list_select_mode_get(list);
+ if (ret_mode != ELM_OBJECT_SELECT_MODE_NONE)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. mode ELM_OBJECT_SELECT_MODE_NONE not set", __FILE__, __LINE__);
+ }
+
+ elm_list_select_mode_set(list, ELM_OBJECT_SELECT_MODE_DEFAULT);
+ ret_mode = elm_list_select_mode_get(list);
+ if (ret_mode != ELM_OBJECT_SELECT_MODE_DEFAULT)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. mode ELM_OBJECT_SELECT_MODE_DEFAULT not set", __FILE__, __LINE__);
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_list_select_mode_get
+ * @{
+ * @objective Negative test case checks situation if the argument of tested function is NULL.
+ * @n Input Data: the current list widget (it will be replaced by NULL in the universal macro).
+ *
+ * @procedure
+ * @step 1 Call function with NULL instead of the list widget.
+ *
+ * @passcondition
+ * Tested function must return ELM_OBJECT_SELECT_MODE_MAX , and there is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_elm_list_select_mode_get_n)
+{
+
+ if (UNITEST_FUNC_NEG_RET(ELM_OBJECT_SELECT_MODE_MAX, elm_list_select_mode_get, list) == TEST_FAIL)
+ {
+ 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_list_select_mode_set
+ * @{
+ * @objective Negative test case checks situation if arguments of tested function become incorrect in turn.
+ * @n Input Data:
+ * @li the given list widget (it will be replaced by NULL);
+ * @li the selection mode (it will be replaced by -100).
+ *
+ * @procedure
+ * @step 1 Call the tested function with NULL instead of first argument.
+ * @step 2 Call the tested function with -100 instead of second argument.
+ *
+ * @passcondition
+ * There is no segmentation fault.
+ * @}
+ */
+START_TEST(utc_elm_list_select_mode_set_n)
+{
+
+ elm_list_select_mode_set(NULL, ELM_OBJECT_SELECT_MODE_DEFAULT);
+ elm_list_select_mode_set(list, -100);
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_list_select_mode_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_list_select_mode_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_list_select_mode_get_p);
+ tcase_add_test(tcase, utc_elm_list_select_mode_get_n);
+ tcase_add_test(tcase, utc_elm_list_select_mode_set_n);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-
-static const int labels_number = 7;
-static const char *labels[] =
-{
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
-};
-
-static Eina_Bool startup_status = EINA_FALSE;
-static Evas_Object *list = NULL;
-static Evas_Object *main_win = NULL;
-
-/**
- * @addtogroup elm_list
- * @{
- * @defgroup elm_list_select_mode_set elm_list_select_mode_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show a main window
- * @step 3 Create a new list with 7 items
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- unsigned int i = 0;
- UTC_ELM_INIT();
- {
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win != NULL)
- {
- evas_object_show(main_win);
- list = elm_list_add(main_win);
- if (list != NULL)
- {
- startup_status = EINA_TRUE;
- for (i = 0; i < labels_number; i++)
- {
- if (elm_list_item_append(list, labels[i], NULL, NULL, NULL, NULL) == NULL)
- {
- startup_status = EINA_FALSE;
- break;
- }
- }
- }
- }
- }
-}
-
-static void
-teardown(void)
-{
- if (list != NULL)
- {
- evas_object_del(list);
- list = NULL;
- }
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_list_select_mode_set
- * @{
- * @objective: Positive test case checks that the tested function correctly sets current selection mode of the given list widget.
- * @n Input Data:
- * @li the given list widget;
- * @li the selection mode.
- *
- * @procedure
- * @step 1 Set selection mode for the given list widget as ELM_OBJECT_SELECT_MODE_ALWAYS.
- * @step 2 Get selection mode for the given list widget.
- * @step 3 Compare retrieved mode with mode which was set previously.
- * @step 4 Set selection mode for the given list widget as ELM_OBJECT_SELECT_MODE_NONE.
- * @step 5 Get selection mode for the given list widget.
- * @step 6 Compare retrieved mode with mode which was set previously.
- * @step 7 Set selection mode for the given list widget as ELM_OBJECT_SELECT_MODE_DEFAULT.
- * @step 8 Get selection mode for the given list widget.
- * @step 9 Compare retrieved mode with mode which was set previously.
- *
- * @passcondition
- * In all cases the retrieved mode of given item must be equal to the mode which was set previously by tested function. Also, there is no segmentation fault.
- * @}
- */
-START_TEST(utc_elm_list_select_mode_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;
- }
-
- Elm_Object_Select_Mode ret_mode;
-
- elm_list_select_mode_set(list, ELM_OBJECT_SELECT_MODE_ALWAYS);
- ret_mode = elm_list_select_mode_get(list);
- if (ret_mode != ELM_OBJECT_SELECT_MODE_ALWAYS)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. mode ELM_OBJECT_SELECT_MODE_ALWAYS not set", __FILE__, __LINE__);
- return;
- }
-
- elm_list_select_mode_set(list, ELM_OBJECT_SELECT_MODE_NONE);
- ret_mode = elm_list_select_mode_get(list);
- if (ret_mode != ELM_OBJECT_SELECT_MODE_NONE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. mode ELM_OBJECT_SELECT_MODE_NONE not set", __FILE__, __LINE__);
- return;
- }
-
- elm_list_select_mode_set(list, ELM_OBJECT_SELECT_MODE_DEFAULT);
- ret_mode = elm_list_select_mode_get(list);
- if (ret_mode != ELM_OBJECT_SELECT_MODE_DEFAULT)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. mode ELM_OBJECT_SELECT_MODE_DEFAULT not set", __FILE__, __LINE__);
- return;
- }
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_list_select_mode_set
- * @{
- * @objective Negative test case checks situation if arguments of tested function become incorrect in turn.
- * @n Input Data:
- * @li the given list widget (it will be replaced by NULL);
- * @li the selection mode (it will be replaced by -100).
- *
- * @procedure
- * @step 1 Call the tested function with NULL instead of first argument.
- * @step 2 Call the tested function with -100 instead of second argument.
- *
- * @passcondition
- * There is no segmentation fault.
- * @}
- */
-START_TEST(utc_elm_list_select_mode_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;
- }
-
- elm_list_select_mode_set(NULL, ELM_OBJECT_SELECT_MODE_DEFAULT);
- elm_list_select_mode_set(list, -100);
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_list_select_mode_set()
-{
- TCase *tcase = tcase_create("utc_elm_list_select_mode_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_list_select_mode_set_p);
- tcase_add_test(tcase, utc_elm_list_select_mode_set_n);
- return tcase;
-}
Eina_Bool ok = EINA_TRUE;
cur_item = elm_list_last_item_get(list);
- if (cur_item == NULL)
- {
+ if (cur_item == NULL)
+ {
ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed..", __FILE__, __LINE__);
return;
}