-utc_elm_genlist_add.c
+utc_elm_genlist_add_clear.c
utc_elm_genlist_at_xy_item_get.c
utc_elm_genlist_at_xy_item_get_mobile.c
-utc_elm_genlist_block_count_get.c
-utc_elm_genlist_block_count_set.c
+utc_elm_genlist_block_count_get_set.c
#utc_elm_genlist_decorated_item_get.c
-#utc_elm_genlist_decorate_mode_get.c
-#utc_elm_genlist_decorate_mode_set.c
-utc_elm_genlist_homogeneous_get.c
-utc_elm_genlist_homogeneous_set.c
+#utc_elm_genlist_decorate_mode_get_set.c
+utc_elm_genlist_homogeneous_get_set.c
utc_elm_genlist_item_append.c
utc_elm_genlist_item_bring_in.c
-utc_elm_genlist_item_cursor_set.c
-utc_elm_genlist_item_cursor_get.c
utc_elm_genlist_item_expanded_depth_get.c
-utc_elm_genlist_item_expanded_get.c
-utc_elm_genlist_item_expanded_set.c
+utc_elm_genlist_item_expanded_get_set.c
utc_elm_genlist_item_fields_update.c
-#utc_elm_genlist_item_flip_get.c
-#utc_elm_genlist_item_flip_set.c
+#utc_elm_genlist_item_flip_get_set.c
utc_elm_genlist_item_insert_after.c
utc_elm_genlist_item_insert_before.c
utc_elm_genlist_item_parent_get.c
utc_elm_genlist_item_prepend.c
-utc_elm_genlist_item_select_mode_get.c
-utc_elm_genlist_item_select_mode_set.c
+utc_elm_genlist_item_select_mode_get_set.c
utc_elm_genlist_item_show.c
utc_elm_genlist_item_sorted_insert.c
utc_elm_genlist_item_subitems_clear.c
utc_elm_genlist_item_tooltip_text_set.c
utc_elm_genlist_item_update.c
-utc_elm_genlist_longpress_timeout_get.c
-utc_elm_genlist_longpress_timeout_set.c
-utc_elm_genlist_mode_get.c
-utc_elm_genlist_mode_set.c
-utc_elm_genlist_multi_select_get.c
-utc_elm_genlist_multi_select_set.c
+utc_elm_genlist_longpress_timeout_get_set.c
+utc_elm_genlist_mode_get_set.c
+utc_elm_genlist_multi_select_get_set.c
utc_elm_genlist_realized_items_get.c
utc_elm_genlist_realized_items_update.c
-utc_elm_genlist_reorder_mode_set.c
-utc_elm_genlist_reorder_mode_get.c
-#DEPRECATED utc_elm_genlist_scroller_policy_get.c
-#DEPRECATED utc_elm_genlist_scroller_policy_set.c
+utc_elm_genlist_reorder_mode_get_set.c
+#DEPRECATED utc_elm_genlist_scroller_policy_get_set.c
utc_elm_genlist_selected_item_get.c
utc_elm_genlist_selected_items_get.c
-#utc_elm_genlist_tree_effect_enabled_get.c
-#utc_elm_genlist_tree_effect_enabled_set.c
-utc_elm_genlist_clear.c
+#utc_elm_genlist_tree_effect_enabled_get_set.c
utc_elm_genlist_first_item_get.c
-utc_elm_genlist_highlight_mode_get.c
-utc_elm_genlist_highlight_mode_set.c
-utc_elm_genlist_item_class_free.c
-utc_elm_genlist_item_class_new.c
+utc_elm_genlist_highlight_mode_get_set.c
+utc_elm_genlist_item_class_new_free.c
utc_elm_genlist_item_class_ref.c
utc_elm_genlist_item_class_unref.c
utc_elm_genlist_item_cursor_style_get_set.c
-utc_elm_genlist_item_cursor_unset.c
-#utc_elm_genlist_item_decorate_mode_get.c
+utc_elm_genlist_item_cursor_get_set_unset.c
+#utc_elm_genlist_item_decorate_mode_get_set.c
utc_elm_genlist_item_demote.c
utc_elm_genlist_item_index_get.c
-utc_elm_genlist_item_item_class_get.c
-utc_elm_genlist_item_item_class_update.c
+utc_elm_genlist_item_item_class_get_update.c
utc_elm_genlist_item_next_get.c
utc_elm_genlist_item_prev_get.c
utc_elm_genlist_item_promote.c
-utc_elm_genlist_item_selected_get.c
-utc_elm_genlist_item_selected_set.c
+utc_elm_genlist_item_selected_get_set.c
utc_elm_genlist_item_tooltip_content_cb_set.c
utc_elm_genlist_item_tooltip_style_get_set.c
utc_elm_genlist_item_tooltip_unset.c
-utc_elm_genlist_item_tooltip_window_mode_get.c
-utc_elm_genlist_item_tooltip_window_mode_set.c
+utc_elm_genlist_item_tooltip_window_mode_get_set.c
utc_elm_genlist_item_type_get.c
utc_elm_genlist_items_count.c
utc_elm_genlist_last_item_get.c
utc_elm_genlist_nth_item_get.c
-utc_elm_genlist_select_mode_get.c
-utc_elm_genlist_select_mode_set.c
+utc_elm_genlist_select_mode_get_set.c
utc_elm_genlist_item_all_contents_unset.c
-utc_elm_genlist_item_cursor_engine_only_set.c
-utc_elm_genlist_item_cursor_engine_only_get.c
+utc_elm_genlist_item_cursor_engine_only_get_set.c
-utc_elm_genlist_add.c
+utc_elm_genlist_add_clear.c
#utc_elm_genlist_at_xy_item_get.c
utc_elm_genlist_at_xy_item_get_mobile.c
-utc_elm_genlist_block_count_get.c
-utc_elm_genlist_block_count_set.c
+utc_elm_genlist_block_count_get_set.c
#utc_elm_genlist_decorated_item_get.c
-#utc_elm_genlist_decorate_mode_get.c
-#utc_elm_genlist_decorate_mode_set.c
-utc_elm_genlist_homogeneous_get.c
-utc_elm_genlist_homogeneous_set.c
+#utc_elm_genlist_decorate_mode_get_set.c
+utc_elm_genlist_homogeneous_get_set.c
utc_elm_genlist_item_append.c
utc_elm_genlist_item_bring_in.c
-utc_elm_genlist_item_cursor_set.c
-utc_elm_genlist_item_cursor_get.c
utc_elm_genlist_item_expanded_depth_get.c
-utc_elm_genlist_item_expanded_get.c
-utc_elm_genlist_item_expanded_set.c
+utc_elm_genlist_item_expanded_get_set.c
utc_elm_genlist_item_fields_update.c
-#utc_elm_genlist_item_flip_get.c
-#utc_elm_genlist_item_flip_set.c
+#utc_elm_genlist_item_flip_get_set.c
utc_elm_genlist_item_insert_after.c
utc_elm_genlist_item_insert_before.c
utc_elm_genlist_item_parent_get.c
utc_elm_genlist_item_prepend.c
-utc_elm_genlist_item_select_mode_get.c
-utc_elm_genlist_item_select_mode_set.c
+utc_elm_genlist_item_select_mode_get_set.c
utc_elm_genlist_item_show.c
utc_elm_genlist_item_sorted_insert.c
utc_elm_genlist_item_subitems_clear.c
utc_elm_genlist_item_tooltip_text_set.c
utc_elm_genlist_item_update.c
-utc_elm_genlist_longpress_timeout_get.c
-utc_elm_genlist_longpress_timeout_set.c
-utc_elm_genlist_mode_get.c
-utc_elm_genlist_mode_set.c
-utc_elm_genlist_multi_select_get.c
-utc_elm_genlist_multi_select_set.c
+utc_elm_genlist_longpress_timeout_get_set.c
+utc_elm_genlist_mode_get_set.c
+utc_elm_genlist_multi_select_get_set.c
utc_elm_genlist_realized_items_get.c
utc_elm_genlist_realized_items_update.c
-utc_elm_genlist_reorder_mode_set.c
-utc_elm_genlist_reorder_mode_get.c
-#DEPRECATED utc_elm_genlist_scroller_policy_get.c
-#DEPRECATED utc_elm_genlist_scroller_policy_set.c
+utc_elm_genlist_reorder_mode_get_set.c
+#DEPRECATED utc_elm_genlist_scroller_policy_get_set.c
utc_elm_genlist_selected_item_get.c
utc_elm_genlist_selected_items_get.c
-#utc_elm_genlist_tree_effect_enabled_get.c
-#utc_elm_genlist_tree_effect_enabled_set.c
-utc_elm_genlist_clear.c
+#utc_elm_genlist_tree_effect_enabled_get_set.c
utc_elm_genlist_first_item_get.c
-utc_elm_genlist_highlight_mode_get.c
-utc_elm_genlist_highlight_mode_set.c
-utc_elm_genlist_item_class_free.c
-utc_elm_genlist_item_class_new.c
+utc_elm_genlist_highlight_mode_get_set.c
+utc_elm_genlist_item_class_new_free.c
utc_elm_genlist_item_class_ref.c
utc_elm_genlist_item_class_unref.c
utc_elm_genlist_item_cursor_style_get_set.c
-utc_elm_genlist_item_cursor_unset.c
-#utc_elm_genlist_item_decorate_mode_get.c
+utc_elm_genlist_item_cursor_get_set_unset.c
+#utc_elm_genlist_item_decorate_mode_get_set.c
utc_elm_genlist_item_demote.c
utc_elm_genlist_item_index_get.c
-utc_elm_genlist_item_item_class_get.c
-utc_elm_genlist_item_item_class_update.c
+utc_elm_genlist_item_item_class_get_update.c
utc_elm_genlist_item_next_get.c
utc_elm_genlist_item_prev_get.c
utc_elm_genlist_item_promote.c
-utc_elm_genlist_item_selected_get.c
-utc_elm_genlist_item_selected_set.c
+utc_elm_genlist_item_selected_get_set.c
utc_elm_genlist_item_tooltip_content_cb_set.c
utc_elm_genlist_item_tooltip_style_get_set.c
utc_elm_genlist_item_tooltip_unset.c
-utc_elm_genlist_item_tooltip_window_mode_get.c
-utc_elm_genlist_item_tooltip_window_mode_set.c
+utc_elm_genlist_item_tooltip_window_mode_get_set.c
utc_elm_genlist_item_type_get.c
utc_elm_genlist_items_count.c
utc_elm_genlist_last_item_get.c
utc_elm_genlist_nth_item_get.c
-utc_elm_genlist_select_mode_get.c
-utc_elm_genlist_select_mode_set.c
+utc_elm_genlist_select_mode_get_set.c
utc_elm_genlist_item_all_contents_unset.c
-utc_elm_genlist_item_cursor_engine_only_set.c
-utc_elm_genlist_item_cursor_engine_only_get.c
+utc_elm_genlist_item_cursor_engine_only_get_set.c
-utc_elm_genlist_add.c
+utc_elm_genlist_add_clear.c
utc_elm_genlist_at_xy_item_get.c
#utc_elm_genlist_at_xy_item_get_mobile.c
-utc_elm_genlist_block_count_get.c
-utc_elm_genlist_block_count_set.c
+utc_elm_genlist_block_count_get_set.c
#utc_elm_genlist_decorated_item_get.c
-#utc_elm_genlist_decorate_mode_get.c
-#utc_elm_genlist_decorate_mode_set.c
-utc_elm_genlist_homogeneous_get.c
-utc_elm_genlist_homogeneous_set.c
+#utc_elm_genlist_decorate_mode_get_set.c
+utc_elm_genlist_homogeneous_get_set.c
utc_elm_genlist_item_append.c
utc_elm_genlist_item_bring_in.c
-utc_elm_genlist_item_cursor_set.c
-utc_elm_genlist_item_cursor_get.c
utc_elm_genlist_item_expanded_depth_get.c
-utc_elm_genlist_item_expanded_get.c
-utc_elm_genlist_item_expanded_set.c
+utc_elm_genlist_item_expanded_get_set.c
utc_elm_genlist_item_fields_update.c
-#utc_elm_genlist_item_flip_get.c
-#utc_elm_genlist_item_flip_set.c
+#utc_elm_genlist_item_flip_get_set.c
utc_elm_genlist_item_insert_after.c
utc_elm_genlist_item_insert_before.c
utc_elm_genlist_item_parent_get.c
utc_elm_genlist_item_prepend.c
-utc_elm_genlist_item_select_mode_get.c
-utc_elm_genlist_item_select_mode_set.c
+utc_elm_genlist_item_select_mode_get_set.c
utc_elm_genlist_item_show.c
utc_elm_genlist_item_sorted_insert.c
utc_elm_genlist_item_subitems_clear.c
utc_elm_genlist_item_tooltip_text_set.c
utc_elm_genlist_item_update.c
-utc_elm_genlist_longpress_timeout_get.c
-utc_elm_genlist_longpress_timeout_set.c
-utc_elm_genlist_mode_get.c
-utc_elm_genlist_mode_set.c
-utc_elm_genlist_multi_select_get.c
-utc_elm_genlist_multi_select_set.c
+utc_elm_genlist_longpress_timeout_get_set.c
+utc_elm_genlist_mode_get_set.c
+utc_elm_genlist_multi_select_get_set.c
utc_elm_genlist_realized_items_get.c
utc_elm_genlist_realized_items_update.c
-utc_elm_genlist_reorder_mode_set.c
-utc_elm_genlist_reorder_mode_get.c
-#DEPRECATED utc_elm_genlist_scroller_policy_get.c
-#DEPRECATED utc_elm_genlist_scroller_policy_set.c
+utc_elm_genlist_reorder_mode_get_set.c
+#DEPRECATED utc_elm_genlist_scroller_policy_get_set.c
utc_elm_genlist_selected_item_get.c
utc_elm_genlist_selected_items_get.c
-#utc_elm_genlist_tree_effect_enabled_get.c
-#utc_elm_genlist_tree_effect_enabled_set.c
-utc_elm_genlist_clear.c
+#utc_elm_genlist_tree_effect_enabled_get_set.c
utc_elm_genlist_first_item_get.c
-utc_elm_genlist_highlight_mode_get.c
-utc_elm_genlist_highlight_mode_set.c
-utc_elm_genlist_item_class_free.c
-utc_elm_genlist_item_class_new.c
+utc_elm_genlist_highlight_mode_get_set.c
+utc_elm_genlist_item_class_new_free.c
utc_elm_genlist_item_class_ref.c
utc_elm_genlist_item_class_unref.c
utc_elm_genlist_item_cursor_style_get_set.c
-utc_elm_genlist_item_cursor_unset.c
-#utc_elm_genlist_item_decorate_mode_get.c
+utc_elm_genlist_item_cursor_get_set_unset.c
+#utc_elm_genlist_item_decorate_mode_get_set.c
utc_elm_genlist_item_demote.c
utc_elm_genlist_item_index_get.c
-utc_elm_genlist_item_item_class_get.c
-utc_elm_genlist_item_item_class_update.c
+utc_elm_genlist_item_item_class_get_update.c
utc_elm_genlist_item_next_get.c
utc_elm_genlist_item_prev_get.c
utc_elm_genlist_item_promote.c
-utc_elm_genlist_item_selected_get.c
-utc_elm_genlist_item_selected_set.c
+utc_elm_genlist_item_selected_get_set.c
utc_elm_genlist_item_tooltip_content_cb_set.c
utc_elm_genlist_item_tooltip_style_get_set.c
utc_elm_genlist_item_tooltip_unset.c
-utc_elm_genlist_item_tooltip_window_mode_get.c
-utc_elm_genlist_item_tooltip_window_mode_set.c
+utc_elm_genlist_item_tooltip_window_mode_get_set.c
utc_elm_genlist_item_type_get.c
utc_elm_genlist_items_count.c
utc_elm_genlist_last_item_get.c
utc_elm_genlist_nth_item_get.c
-utc_elm_genlist_select_mode_get.c
-utc_elm_genlist_select_mode_set.c
+utc_elm_genlist_select_mode_get_set.c
utc_elm_genlist_item_all_contents_unset.c
-utc_elm_genlist_item_cursor_engine_only_set.c
-utc_elm_genlist_item_cursor_engine_only_get.c
+utc_elm_genlist_item_cursor_engine_only_get_set.c
-utc_elm_genlist_add.c
+utc_elm_genlist_add_clear.c
utc_elm_genlist_at_xy_item_get.c
#utc_elm_genlist_at_xy_item_get_mobile.c
-utc_elm_genlist_block_count_get.c
-utc_elm_genlist_block_count_set.c
+utc_elm_genlist_block_count_get_set.c
#utc_elm_genlist_decorated_item_get.c
-#utc_elm_genlist_decorate_mode_get.c
-#utc_elm_genlist_decorate_mode_set.c
-utc_elm_genlist_homogeneous_get.c
-utc_elm_genlist_homogeneous_set.c
+#utc_elm_genlist_decorate_mode_get_set.c
+utc_elm_genlist_homogeneous_get_set.c
utc_elm_genlist_item_append.c
utc_elm_genlist_item_bring_in.c
-utc_elm_genlist_item_cursor_set.c
-utc_elm_genlist_item_cursor_get.c
utc_elm_genlist_item_expanded_depth_get.c
-utc_elm_genlist_item_expanded_get.c
-utc_elm_genlist_item_expanded_set.c
+utc_elm_genlist_item_expanded_get_set.c
utc_elm_genlist_item_fields_update.c
-#utc_elm_genlist_item_flip_get.c
-#utc_elm_genlist_item_flip_set.c
+#utc_elm_genlist_item_flip_get_set.c
utc_elm_genlist_item_insert_after.c
utc_elm_genlist_item_insert_before.c
utc_elm_genlist_item_parent_get.c
utc_elm_genlist_item_prepend.c
-utc_elm_genlist_item_select_mode_get.c
-utc_elm_genlist_item_select_mode_set.c
+utc_elm_genlist_item_select_mode_get_set.c
utc_elm_genlist_item_show.c
utc_elm_genlist_item_sorted_insert.c
utc_elm_genlist_item_subitems_clear.c
utc_elm_genlist_item_tooltip_text_set.c
utc_elm_genlist_item_update.c
-utc_elm_genlist_longpress_timeout_get.c
-utc_elm_genlist_longpress_timeout_set.c
-utc_elm_genlist_mode_get.c
-utc_elm_genlist_mode_set.c
-utc_elm_genlist_multi_select_get.c
-utc_elm_genlist_multi_select_set.c
+utc_elm_genlist_longpress_timeout_get_set.c
+utc_elm_genlist_mode_get_set.c
+utc_elm_genlist_multi_select_get_set.c
utc_elm_genlist_realized_items_get.c
utc_elm_genlist_realized_items_update.c
-utc_elm_genlist_reorder_mode_set.c
-utc_elm_genlist_reorder_mode_get.c
-#DEPRECATED utc_elm_genlist_scroller_policy_get.c
-#DEPRECATED utc_elm_genlist_scroller_policy_set.c
+utc_elm_genlist_reorder_mode_get_set.c
+#DEPRECATED utc_elm_genlist_scroller_policy_get_set.c
utc_elm_genlist_selected_item_get.c
utc_elm_genlist_selected_items_get.c
-#utc_elm_genlist_tree_effect_enabled_get.c
-#utc_elm_genlist_tree_effect_enabled_set.c
-utc_elm_genlist_clear.c
+#utc_elm_genlist_tree_effect_enabled_get_set.c
utc_elm_genlist_first_item_get.c
-utc_elm_genlist_highlight_mode_get.c
-utc_elm_genlist_highlight_mode_set.c
-utc_elm_genlist_item_class_free.c
-utc_elm_genlist_item_class_new.c
+utc_elm_genlist_highlight_mode_get_set.c
+utc_elm_genlist_item_class_new_free.c
utc_elm_genlist_item_class_ref.c
utc_elm_genlist_item_class_unref.c
utc_elm_genlist_item_cursor_style_get_set.c
-utc_elm_genlist_item_cursor_unset.c
-#utc_elm_genlist_item_decorate_mode_get.c
+utc_elm_genlist_item_cursor_get_set_unset.c
+#utc_elm_genlist_item_decorate_mode_get_set.c
utc_elm_genlist_item_demote.c
utc_elm_genlist_item_index_get.c
-utc_elm_genlist_item_item_class_get.c
-utc_elm_genlist_item_item_class_update.c
+utc_elm_genlist_item_item_class_get_update.c
utc_elm_genlist_item_next_get.c
utc_elm_genlist_item_prev_get.c
utc_elm_genlist_item_promote.c
-utc_elm_genlist_item_selected_get.c
-utc_elm_genlist_item_selected_set.c
+utc_elm_genlist_item_selected_get_set.c
utc_elm_genlist_item_tooltip_content_cb_set.c
utc_elm_genlist_item_tooltip_style_get_set.c
utc_elm_genlist_item_tooltip_unset.c
-utc_elm_genlist_item_tooltip_window_mode_get.c
-utc_elm_genlist_item_tooltip_window_mode_set.c
+utc_elm_genlist_item_tooltip_window_mode_get_set.c
utc_elm_genlist_item_type_get.c
utc_elm_genlist_items_count.c
utc_elm_genlist_last_item_get.c
utc_elm_genlist_nth_item_get.c
-utc_elm_genlist_select_mode_get.c
-utc_elm_genlist_select_mode_set.c
+utc_elm_genlist_select_mode_get_set.c
utc_elm_genlist_item_all_contents_unset.c
-utc_elm_genlist_item_cursor_engine_only_set.c
-utc_elm_genlist_item_cursor_engine_only_get.c
+utc_elm_genlist_item_cursor_engine_only_get_set.c
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_add elm_genlist_add()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_add
- * @{
- * @objective Positive Test case checks if function call with valid value to add a new genlist
- * widget to the given parent Elementary (container) object works properly and without segmentation fault
- * @n Input Data:
- * @li the window object
- *
- * @procedure
- * @step 1 Call elm_genlist_add with valid value
- *
- * @passcondition
- * @li Test passes if returned value is not NULL and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_add_p)
-{
- if (main_win == NULL)
- {
- return;
- }
-
- Evas_Object *ret = NULL;
-
- ret = elm_genlist_add(main_win);
- if (!ret)
- {
- 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_genlist_add
- * @{
- * @objective Negative Test case checks if function call with invalid value to add a new genlist
- * widget to the given parent Elementary (container) object works properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the window object
- *
- * @procedure
- * @step 1 Call elm_genlist_add with invalid value instead of the window object
- *
- * @passcondition
- * @li Test passes if returned value is NULL and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_add_n)
-{
- if (TEST_FAIL == UNITEST_FUNC_NEG_RET(NULL, elm_genlist_add, main_win))
- {
- 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_genlist_add()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_add");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_add_p);
- tcase_add_test(tcase, utc_elm_genlist_add_n);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+#include "../../utc_negative_unitest.h"
+
+static Elm_Genlist_Item_Class* itc = NULL;
+static Evas_Object *main_win = NULL, *genlist = NULL;
+
+/**
+ * @addtogroup elm_genlist
+ * @{
+ * @defgroup elm_genlist_clear elm_genlist_clear()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show main window
+ * @step 3 Add a genlist to the main window
+ * @step 4 Add genlist's item class in the genlist
+ */
+
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ }
+
+ genlist = elm_genlist_add(main_win);
+ if (genlist == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
+ }
+
+ itc = elm_genlist_item_class_new();
+ if (itc == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a genlist item class..", __FILE__, __LINE__);
+ }
+ itc->item_style = "default";
+ itc->func.text_get = NULL;
+ evas_object_show(main_win);
+}
+
+static void
+teardown(void)
+{
+ if (main_win != NULL)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+
+ //object deletion
+ elm_genlist_item_class_free(itc);
+ itc = NULL;
+
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_genlist_clear
+ * @{
+ * @objective Positive Test case checks whether genlist is empty after clear
+ * @n Input Data:
+ * @li the genlist object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_item_append multiple times to add items to genlist
+ * @step 2 Call elm_genlist_items_count to check whether item count isn't 0
+ * @step 3 Call elm_genlist_clear to delete elements in genlist
+ * @step 4 Call elm_genlist_items_count to get items number
+ * @step 5 Check whether genlist is empty
+ *
+ * @passcondition
+ * @li Test passes if items are actully added, and items number is equal to 0 after genlist clear
+ * @}
+ */
+START_TEST(utc_elm_genlist_clear_p_1)
+{
+ Elm_Object_Item* item_group = elm_genlist_item_append(genlist, itc, NULL, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL);
+ if (item_group == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ Elm_Object_Item* item_subgroup_tree = elm_genlist_item_append(genlist, itc, NULL, item_group, ELM_GENLIST_ITEM_TREE, NULL, NULL);
+ if (item_subgroup_tree == NULL)
+ {
+ elm_genlist_item_subitems_clear(item_group);
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ Elm_Object_Item* item_sub_tree = elm_genlist_item_append(genlist, itc, NULL, item_subgroup_tree, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ if (item_sub_tree == NULL)
+ {
+ elm_genlist_item_subitems_clear(item_group);
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ Elm_Object_Item* item_subgroup = elm_genlist_item_append(genlist, itc, NULL, item_group, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ if (item_subgroup == NULL)
+ {
+ elm_genlist_item_subitems_clear(item_group);
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ if (0 != elm_genlist_items_count(genlist))
+ {
+ elm_genlist_clear(genlist);
+ if (0 != elm_genlist_items_count(genlist))
+ {
+ elm_genlist_item_subitems_clear(item_group);
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to clear genlist.., __FILE__, __LINE__");
+ }
+ }
+ else
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to clear genlist, no elements has been added to a given genlist widget..", __FILE__, __LINE__);
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_genlist_add
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to add a new genlist
+ * widget to the given parent Elementary (container) object works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the window object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_add with invalid value instead of the window object
+ *
+ * @passcondition
+ * @li Test passes if returned value is NULL and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_add_n)
+{
+ if (TEST_FAIL == UNITEST_FUNC_NEG_RET(NULL, elm_genlist_add, main_win))
+ {
+ 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_genlist_clear
+ * @{
+ * @objective Negative Test case checks if function call with invalid value works without segmentation fault
+ * @n Input Data:
+ * @li the genlist object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_clear with invalid value instead of the genlist object
+ *
+ * @passcondition
+ * @li Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_clear_n_1)
+{
+ UNITEST_FUNC_NEG(elm_genlist_clear, genlist);
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+/**
+*@}
+*/
+
+TCase * _utc_elm_genlist_add_clear()
+{
+ TCase *tcase = tcase_create("utc_elm_genlist_add_clear");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_genlist_clear_p_1);
+ tcase_add_test(tcase, utc_elm_genlist_add_n);
+ tcase_add_test(tcase, utc_elm_genlist_clear_n_1);
+ return tcase;
+}
if (main_win == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
}
evas_object_show(main_win);
genlist = elm_genlist_add(main_win);
if (genlist == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
}
evas_object_show(genlist);
evas_object_resize(genlist, 100, 100);
if (gic == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
- return;
}
item = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
if (item == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
- return;
}
}
*/
START_TEST(utc_elm_genlist_at_xy_item_get_p)
{
- if (main_win == NULL || genlist == NULL || gic == NULL || item == NULL)
- {
- return;
- }
-
Evas_Coord x = 0, y = 0, w = 0, h = 0, mx = 0, my = 0;
Elm_Object_Item *ret = NULL;
int posret = 10;
evas_object_geometry_get(genlist, &x, &y, &w, &h);
- ecore_timer_add(.5, _quit_timer_cb, NULL);
+ ecore_timer_add(0.2, _quit_timer_cb, NULL);
ecore_main_loop_begin();
mx = w / 2 + x;
my = h / 2 + y;
if (ret == NULL || ret != item)
{
ck_abort_msg("[TEST_FAIL]:: %i_%i_%i_%i_%i_%s[%d] : Test has failed..", x, y, w, h, posret, __FILE__, __LINE__);
- return;
}
printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
}
*/
START_TEST(utc_elm_genlist_at_xy_item_get_n)
{
- if (main_win == NULL || genlist == NULL || gic == NULL || item == NULL)
- {
- return;
- }
-
Evas_Coord x = -100, y = -100;
CREATE_CHECKED_ARGS_ARRAY(1, 1, 1, 0)
if (result_of_testing == 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__);
}
if (main_win == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
}
evas_object_show(main_win);
genlist = elm_genlist_add(main_win);
if (genlist == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
}
evas_object_show(genlist);
evas_object_resize(genlist, 100, 100);
if (gic == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
- return;
}
item = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
if (item == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
- return;
}
}
*/
START_TEST(utc_elm_genlist_at_xy_item_get_mobile_p)
{
- if (main_win == NULL || genlist == NULL || gic == NULL || item == NULL)
- {
- return;
- }
-
Evas_Coord x = 0, y = 0, w = 0, h = 0;
Elm_Object_Item *ret = NULL;
int posret = 10;
- ecore_timer_add(.5, _quit_timer_cb, NULL);
+ ecore_timer_add(0.2, _quit_timer_cb, NULL);
ecore_main_loop_begin();
evas_object_geometry_get(item, &x, &y, &w, &h);
if (ret == NULL || ret != item)
{
ck_abort_msg("[TEST_FAIL]:: %i_%i_%i_%i_%i_%s[%d] : Test has failed..", x, y, w, h, posret, __FILE__, __LINE__);
- return;
}
printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
}
*/
START_TEST(utc_elm_genlist_at_xy_item_get_mobile_n)
{
- if (main_win == NULL || genlist == NULL || gic == NULL || item == NULL)
- {
- return;
- }
-
Evas_Coord x = -100, y = -100;
CREATE_CHECKED_ARGS_ARRAY(1, 1, 1, 0)
if (result_of_testing == 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__);
}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_block_count_get elm_genlist_block_count_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window and show it
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(genlist);
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_block_count_get
- * @{
- * @objective Positive Test case checks if function call with valid value to get the maximum
- * number of items within an item block works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist object
- *
- * @procedure
- * @step 1 Set the maximum number of items within an item block
- * @step 2 Call elm_genlist_block_count_get with valid value
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_block_count_get_p)
-{
- if (main_win == NULL || genlist == NULL)
- {
- return;
- }
-
- int ret = 0;
-
- elm_genlist_block_count_set(genlist, 5);
- ret = elm_genlist_block_count_get(genlist);
- if (ret != 5)
- {
- 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_genlist_block_count_get
- * @{
- * @objective Negative Test case checks if function call with invalid value to get the maximum
- * number of items within an item block works properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the genlist object
- *
- * @procedure
- * @step 1 Call elm_genlist_block_count_get with invalid value instead of the genlist object
- *
- * @passcondition
- * @li Test passes if returned value is 0 and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_block_count_get_n)
-{
- if (TEST_FAIL == UNITEST_FUNC_NEG_RET(0, elm_genlist_block_count_get, genlist))
- {
- 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_genlist_block_count_get()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_block_count_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_block_count_get_p);
- tcase_add_test(tcase, utc_elm_genlist_block_count_get_n);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+#include "../../utc_negative_unitest.h"
+static Evas_Object *main_win = NULL, *genlist = NULL;
+
+/**
+ * @addtogroup elm_genlist
+ * @{
+ * @defgroup elm_genlist_block_count_set elm_genlist_block_count_set()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show main window
+ * @step 3 Add a genlist to the main window and show it
+ */
+
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ }
+ evas_object_show(main_win);
+ genlist = elm_genlist_add(main_win);
+ if (genlist == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
+ }
+ evas_object_show(genlist);
+}
+
+static void
+teardown(void)
+{
+ if (main_win != NULL)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_genlist_block_count_set
+ * @{
+ * @objective Positive Test case checks if function call with valid values to set the maximum
+ * number of items within an item block works properly and without segmentation fault
+ * @n Input Data:
+ * @li the genlist object
+ * @li 5 as the maximum number of items within an item block. Default is 32
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_block_count_get with valid values
+ * @step 2 Get the maximum number of items within an item block
+ *
+ * @passcondition
+ * @li Test passes if returned value is same as specified value and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_block_count_set_p)
+{
+ int ret = 0;
+
+ elm_genlist_block_count_set(genlist, 5);
+ ret = elm_genlist_block_count_get(genlist);
+ if (ret != 5)
+ {
+ 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_genlist_block_count_set
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to set the maximum
+ * number of items within an item block works without segmentation fault
+ * @n Input Data:
+ * @li NULL, the genlist object
+ * @li 5, -5 as the maximum number of items within an item block. Default is 32
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_block_count_get with invalid value instead of the genlist object
+ * @step 2 Call elm_genlist_block_count_get with invalid value instead of the maximum number of items within an item block
+ *
+ * @passcondition
+ * @li Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_block_count_set_n)
+{
+ CREATE_CHECKED_ARGS_ARRAY(1, 0)
+ UNITEST_FUNC_NEG_CA(elm_genlist_block_count_set, genlist, 5)
+ elm_genlist_block_count_set(genlist, -5);
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_genlist_block_count_get
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to get the maximum
+ * number of items within an item block works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the genlist object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_block_count_get with invalid value instead of the genlist object
+ *
+ * @passcondition
+ * @li Test passes if returned value is 0 and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_block_count_get_n)
+{
+ if (TEST_FAIL == UNITEST_FUNC_NEG_RET(0, elm_genlist_block_count_get, genlist))
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_genlist_block_count_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_genlist_block_count_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_genlist_block_count_set_p);
+ tcase_add_test(tcase, utc_elm_genlist_block_count_set_n);
+ tcase_add_test(tcase, utc_elm_genlist_block_count_get_n);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_block_count_set elm_genlist_block_count_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window and show it
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(genlist);
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_block_count_set
- * @{
- * @objective Positive Test case checks if function call with valid values to set the maximum
- * number of items within an item block works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist object
- * @li 5 as the maximum number of items within an item block. Default is 32
- *
- * @procedure
- * @step 1 Call elm_genlist_block_count_get with valid values
- * @step 2 Get the maximum number of items within an item block
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_block_count_set_p)
-{
- if (main_win == NULL || genlist == NULL)
- {
- return;
- }
-
- int ret = 0;
-
- elm_genlist_block_count_set(genlist, 5);
- ret = elm_genlist_block_count_get(genlist);
- if (ret != 5)
- {
- 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_genlist_block_count_set
- * @{
- * @objective Negative Test case checks if function call with invalid value to set the maximum
- * number of items within an item block works without segmentation fault
- * @n Input Data:
- * @li NULL, the genlist object
- * @li 5, -5 as the maximum number of items within an item block. Default is 32
- *
- * @procedure
- * @step 1 Call elm_genlist_block_count_get with invalid value instead of the genlist object
- * @step 2 Call elm_genlist_block_count_get with invalid value instead of the maximum number of items within an item block
- *
- * @passcondition
- * @li Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_block_count_set_n)
-{
- if (main_win == NULL || genlist == NULL)
- {
- return;
- }
-
- CREATE_CHECKED_ARGS_ARRAY(1, 0)
- UNITEST_FUNC_NEG_CA(elm_genlist_block_count_set, genlist, 5)
- elm_genlist_block_count_set(genlist, -5);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_genlist_block_count_set()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_block_count_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_block_count_set_p);
- tcase_add_test(tcase, utc_elm_genlist_block_count_set_n);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-
-static Elm_Genlist_Item_Class* itc = NULL;
-static Evas_Object *main_win = NULL, *genlist = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_clear elm_genlist_clear()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- * @step 4 Add genlist's item class in the genlist
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
-
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
-
- itc = elm_genlist_item_class_new();
- if (itc == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a genlist item class..", __FILE__, __LINE__);
- return;
- }
- itc->item_style = "default";
- itc->func.text_get = NULL;
- evas_object_show(main_win);
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
-
- //object deletion
- elm_genlist_item_class_free(itc);
- itc = NULL;
-
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_clear
- * @{
- * @objective Positive Test case checks whether genlist is empty after clear
- * @n Input Data:
- * @li the genlist object
- *
- * @procedure
- * @step 1 Call elm_genlist_item_append multiple times to add items to genlist
- * @step 2 Call elm_genlist_items_count to check whether item count isn't 0
- * @step 3 Call elm_genlist_clear to delete elements in genlist
- * @step 4 Call elm_genlist_items_count to get items number
- * @step 5 Check whether genlist is empty
- *
- * @passcondition
- * @li Test passes if items are actully added, and items number is equal to 0 after genlist clear
- * @}
- */
-START_TEST(utc_elm_genlist_clear_p_1)
-{
- if (main_win == NULL)
- {
- return;
- }
-
- Elm_Object_Item* item_group = elm_genlist_item_append(genlist, itc, NULL, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL);
- if (item_group == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- Elm_Object_Item* item_subgroup_tree = elm_genlist_item_append(genlist, itc, NULL, item_group, ELM_GENLIST_ITEM_TREE, NULL, NULL);
- if (item_subgroup_tree == NULL)
- {
- elm_genlist_item_subitems_clear(item_group);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- Elm_Object_Item* item_sub_tree = elm_genlist_item_append(genlist, itc, NULL, item_subgroup_tree, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- if (item_sub_tree == NULL)
- {
- elm_genlist_item_subitems_clear(item_group);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- Elm_Object_Item* item_subgroup = elm_genlist_item_append(genlist, itc, NULL, item_group, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- if (item_subgroup == NULL)
- {
- elm_genlist_item_subitems_clear(item_group);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- if (0 != elm_genlist_items_count(genlist))
- {
- elm_genlist_clear(genlist);
- if (0 != elm_genlist_items_count(genlist))
- {
- elm_genlist_item_subitems_clear(item_group);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to clear genlist.., __FILE__, __LINE__");
- return;
- }
- }
- else
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to clear genlist, no elements has been added to a given genlist widget..", __FILE__, __LINE__);
- return;
- }
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_genlist_clear
- * @{
- * @objective Negative Test case checks if function call with invalid value works without segmentation fault
- * @n Input Data:
- * @li the genlist object
- *
- * @procedure
- * @step 1 Call elm_genlist_clear with invalid value instead of the genlist object
- *
- * @passcondition
- * @li Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_clear_n_1)
-{
- UNITEST_FUNC_NEG(elm_genlist_clear, genlist);
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-/**
-*@}
-*/
-
-TCase * _utc_elm_genlist_clear()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_clear");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_clear_p_1);
- tcase_add_test(tcase, utc_elm_genlist_clear_n_1);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_decorate_mode_get elm_genlist_decorate_mode_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_decorate_mode_get
- * @{
- * @objective Positive Test case checks if function call with valid value to get Genlist
- * decorate mode works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist object
- *
- * @procedure
- * @step 1 Activate decorate mode
- * @step 2 Call elm_genlist_decorate_mode_get with valid value
- * @step 3 Activate normal mode
- * @step 4 Call elm_genlist_decorate_mode_get with valid value
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_decorate_mode_get_p)
-{
- if (main_win == NULL || genlist == NULL)
- {
- return;
- }
-
- Eina_Bool ret_mode = EINA_FALSE;
-
- elm_genlist_decorate_mode_set(genlist, EINA_TRUE);
- ret_mode = elm_genlist_decorate_mode_get(genlist);
- if (ret_mode == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- elm_genlist_decorate_mode_set(genlist, EINA_FALSE);
- ret_mode = elm_genlist_decorate_mode_get(genlist);
- if (ret_mode == 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_genlist_decorate_mode_get
- * @{
- * @objective Negative Test case checks if function call with invalid value to get Genlist
- * decorate mode works properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the genlist object
- *
- * @procedure
- * @step 1 Call elm_genlist_decorate_mode_get with invalid value instead of the genlist object
- *
- * @passcondition
- * @li Test passes if returned value is EINA_FALSE and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_decorate_mode_get_n)
-{
- if (TEST_FAIL == UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_genlist_decorate_mode_get, genlist))
- {
- 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_genlist_decorate_mode_get()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_decorate_mode_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_decorate_mode_get_p);
- tcase_add_test(tcase, utc_elm_genlist_decorate_mode_get_n);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+#include "../../utc_negative_unitest.h"
+static Evas_Object *main_win = NULL, *genlist = NULL;
+
+/**
+ * @addtogroup elm_genlist
+ * @{
+ * @defgroup elm_genlist_decorate_mode_set elm_genlist_decorate_mode_set()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show main window
+ * @step 3 Add a genlist to the main window
+ */
+
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ }
+ evas_object_show(main_win);
+ genlist = elm_genlist_add(main_win);
+ if (genlist == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
+ }
+}
+
+static void
+teardown(void)
+{
+ if (main_win != NULL)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_genlist_decorate_mode_set
+ * @{
+ * @objective Positive Test case checks if function call with valid values to set genlist
+ * decorate mode works properly and without segmentation fault
+ * @n Input Data:
+ * @li the genlist object
+ * @li EINA_TRUE, EINA_FALSE as the decorate mode status (EINA_TRUE = decorate mode, EINA_FALSE = normal mode)
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_decorate_mode_set with EINA_TRUE as the decorate mode status
+ * @step 2 Get genlist decorate mode
+ * @step 3 Call elm_genlist_decorate_mode_set with EINA_FALSE as the decorate mode status
+ * @step 4 Get genlist decorate mode
+ *
+ * @passcondition
+ * @li Test passes if returned value is same as specified value and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_decorate_mode_set_p)
+{
+ Eina_Bool ret_mode = EINA_FALSE;
+
+ elm_genlist_decorate_mode_set(genlist, EINA_TRUE);
+ ret_mode = elm_genlist_decorate_mode_get(genlist);
+ if (ret_mode == EINA_FALSE)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ elm_genlist_decorate_mode_set(genlist, EINA_FALSE);
+ ret_mode = elm_genlist_decorate_mode_get(genlist);
+ if (ret_mode == 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_genlist_decorate_mode_set
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to set genlist
+ * decorate mode works without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the genlist object
+ * @li EINA_TRUE as the decorate mode status (EINA_TRUE = decorate mode, EINA_FALSE = normal mode)
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_decorate_mode_set with invalid value instead of the genlist object
+ *
+ * @passcondition
+ * @li Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_decorate_mode_set_n)
+{
+ CREATE_CHECKED_ARGS_ARRAY(1, 0)
+ UNITEST_FUNC_NEG_CA(elm_genlist_decorate_mode_set, genlist, EINA_TRUE)
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_genlist_decorate_mode_get
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to get Genlist
+ * decorate mode works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the genlist object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_decorate_mode_get with invalid value instead of the genlist object
+ *
+ * @passcondition
+ * @li Test passes if returned value is EINA_FALSE and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_decorate_mode_get_n)
+{
+ if (TEST_FAIL == UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_genlist_decorate_mode_get, genlist))
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_genlist_decorate_mode_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_genlist_decorate_mode_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_genlist_decorate_mode_set_p);
+ tcase_add_test(tcase, utc_elm_genlist_decorate_mode_set_n);
+ tcase_add_test(tcase, utc_elm_genlist_decorate_mode_get_n);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_decorate_mode_set elm_genlist_decorate_mode_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_decorate_mode_set
- * @{
- * @objective Positive Test case checks if function call with valid values to set genlist
- * decorate mode works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist object
- * @li EINA_TRUE, EINA_FALSE as the decorate mode status (EINA_TRUE = decorate mode, EINA_FALSE = normal mode)
- *
- * @procedure
- * @step 1 Call elm_genlist_decorate_mode_set with EINA_TRUE as the decorate mode status
- * @step 2 Get genlist decorate mode
- * @step 3 Call elm_genlist_decorate_mode_set with EINA_FALSE as the decorate mode status
- * @step 4 Get genlist decorate mode
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_decorate_mode_set_p)
-{
- if (main_win == NULL || genlist == NULL)
- {
- return;
- }
-
- Eina_Bool ret_mode = EINA_FALSE;
-
- elm_genlist_decorate_mode_set(genlist, EINA_TRUE);
- ret_mode = elm_genlist_decorate_mode_get(genlist);
- if (ret_mode == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- elm_genlist_decorate_mode_set(genlist, EINA_FALSE);
- ret_mode = elm_genlist_decorate_mode_get(genlist);
- if (ret_mode == 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_genlist_decorate_mode_set
- * @{
- * @objective Negative Test case checks if function call with invalid value to set genlist
- * decorate mode works without segmentation fault
- * @n Input Data:
- * @li NULL instead of the genlist object
- * @li EINA_TRUE as the decorate mode status (EINA_TRUE = decorate mode, EINA_FALSE = normal mode)
- *
- * @procedure
- * @step 1 Call elm_genlist_decorate_mode_set with invalid value instead of the genlist object
- *
- * @passcondition
- * @li Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_decorate_mode_set_n)
-{
- CREATE_CHECKED_ARGS_ARRAY(1, 0)
- UNITEST_FUNC_NEG_CA(elm_genlist_decorate_mode_set, genlist, EINA_TRUE)
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_genlist_decorate_mode_set()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_decorate_mode_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_decorate_mode_set_p);
- tcase_add_test(tcase, utc_elm_genlist_decorate_mode_set_n);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_highlight_mode_get elm_genlist_highlight_mode_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-#define TEST_FAIL(MESSAGE) \
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : %s", __FILE__, __LINE__, MESSAGE); \
- return;
-
-
-#define TEST_PASS(MESSAGE) \
- printf("[TEST_PASS]:: %s[%d] : %s\n", __FILE__, __LINE__, MESSAGE); \
-
-
-
-/**
- * @addtogroup elm_genlist_highlight_mode_get
- * @{
- * @objective Positive Test 01 case checks if function call with valid value to find out
- * whether the genlist items' should be highlighted when item selected and works properly
- * and without segmentation fault
- * @n Input Data:
- * @li the genlist object
- *
- * @procedure
- * @step 1 Call elm_genlist_highlight_mode_set to set that the genlist items' should NOT be
- * highlighted when item selected (argument highlight = EINA_FALSE)
- * @step 2 Call elm_genlist_highlight_mode_get for genlist, result must be EINA_FALSE
- * @step 3 Call elm_genlist_highlight_mode_set to set that the genlist items' should be
- * highlighted when item selected (argument highlight = EINA_TRUE)
- * @step 4 Call elm_genlist_highlight_mode_get for genlist, result must be EINA_FALSE
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-
-START_TEST(utc_elm_genlist_highlight_mode_get_p_01)
-{
- if (main_win == NULL || genlist == NULL)
- {
- TEST_FAIL("Test has failed..");
- }
-
-
- const Eina_Bool highlight_FALSE = EINA_FALSE;
- elm_genlist_highlight_mode_set(genlist, highlight_FALSE);
- if (elm_genlist_highlight_mode_get(genlist) != highlight_FALSE)
- {
- TEST_FAIL("Test has failed..");
- }
-
- const Eina_Bool highlight_TRUE = EINA_TRUE;
- elm_genlist_highlight_mode_set(genlist, highlight_TRUE);
- if (elm_genlist_highlight_mode_get(genlist) != highlight_TRUE)
- {
- TEST_FAIL("Test has failed..");
- }
-
- TEST_PASS("Test has passed..");
-}
-END_TEST
-
-/**
- * @addtogroup elm_genlist_highlight_mode_get
- * @{
- * @objective Negative Test 01 case checks if function call with invalid value to check
- * whether the genlist items' should be highlighted when item selected.
- * @n Input Data:
- * @li NULL instead of the genlist object
- *
- * @procedure
- * @step 1 Call elm_genlist_highlight_mode_get with invalid value instead of the genlist item object
- *
- * @passcondition
- * @li Test passes if returned value is EINA_FALSE and there is no segmentation fault
- * @}
- */
-
-START_TEST(utc_elm_genlist_highlight_mode_get_n_01)
-{
-
- if (elm_genlist_highlight_mode_get(NULL) != EINA_FALSE)
- {
- TEST_FAIL("Test has failed..");
- }
-
- TEST_PASS("Test has passed..");
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_genlist_highlight_mode_get()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_highlight_mode_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_highlight_mode_get_p_01);
- tcase_add_test(tcase, utc_elm_genlist_highlight_mode_get_n_01);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+#include "../../utc_negative_unitest.h"
+static Evas_Object *main_win = NULL, *genlist = NULL;
+
+/**
+ * @addtogroup elm_genlist
+ * @{
+ * @defgroup elm_genlist_highlight_mode_set elm_genlist_highlight_mode_set()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show main window
+ * @step 3 Add a genlist to the main window
+ */
+
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ }
+ evas_object_show(main_win);
+ genlist = elm_genlist_add(main_win);
+ if (genlist == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
+ }
+}
+
+static void
+teardown(void)
+{
+ if (main_win != NULL)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+#define TEST_FAIL(MESSAGE) \
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : %s", __FILE__, __LINE__, MESSAGE);
+
+
+#define TEST_PASS(MESSAGE) \
+ printf("[TEST_PASS]:: %s[%d] : %s\n", __FILE__, __LINE__, MESSAGE); \
+
+
+
+/**
+ * @addtogroup elm_genlist_highlight_mode_set
+ * @{
+ * @objective Positive Test case 01 checks if function call with valid value to find out
+ * whether the genlist items' should be highlighted when item selected and works properly
+ * and without segmentation fault
+ * @n Input Data:
+ * @li the genlist object
+ * @li highlight @c EINA_TRUE to enable highlighting or @c EINA_FALSE to disable it
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_highlight_mode_set to set that the genlist items' should NOT be
+ * highlighted when item selected (argument highlight = EINA_FALSE)
+ * @step 2 Call elm_genlist_highlight_mode_set for genlist, result must be EINA_FALSE
+ * @step 3 Call elm_genlist_highlight_mode_set to set that the genlist items' should be
+ * highlighted when item selected (argument highlight = EINA_TRUE)
+ * @step 4 Call elm_genlist_highlight_mode_set for genlist, result must be EINA_FALSE
+ *
+ * @passcondition
+ * @li Test passes if returned value by calling the function elm_genlist_highlight_mode_get
+ * is same as specified in argument of function elm_genlist_highlight_mode_set
+ * and there is no segmentation fault
+ * @}
+ */
+
+START_TEST(utc_elm_genlist_highlight_mode_set_p_01)
+{
+ const Eina_Bool highlight_FALSE = EINA_FALSE;
+ elm_genlist_highlight_mode_set(genlist, highlight_FALSE);
+ if (elm_genlist_highlight_mode_get(genlist) != highlight_FALSE)
+ {
+ TEST_FAIL("Test has failed..");
+ }
+
+ const Eina_Bool highlight_TRUE = EINA_TRUE;
+ elm_genlist_highlight_mode_set(genlist, highlight_TRUE);
+ if (elm_genlist_highlight_mode_get(genlist) != highlight_TRUE)
+ {
+ TEST_FAIL("Test has failed..");
+ }
+
+ TEST_PASS("Test has passed..");
+}
+END_TEST
+
+/**
+ * @addtogroup elm_genlist_highlight_mode_set
+ * @{
+ * @objective Negative Test 01 case checks if function call with invalid value to check
+ * whether the genlist items' should be highlighted when item selected.
+ * @n Input Data:
+ * @li NULL instead of the genlist object
+ * @li highlight @c EINA_TRUE to enable highlighting or @c EINA_FALSE to disable it
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_highlight_mode_set with invalid value instead of the genlist item object
+ *
+ * @passcondition
+ * @li Test passes if there is no segmentation fault
+ * @}
+ */
+
+START_TEST(utc_elm_genlist_highlight_mode_set_n_01)
+{
+
+ elm_genlist_highlight_mode_set(NULL, EINA_FALSE);
+ elm_genlist_highlight_mode_set(NULL, EINA_TRUE);
+
+ TEST_PASS("Test has passed..");
+}
+END_TEST
+
+/**
+ * @addtogroup elm_genlist_highlight_mode_get
+ * @{
+ * @objective Negative Test 01 case checks if function call with invalid value to check
+ * whether the genlist items' should be highlighted when item selected.
+ * @n Input Data:
+ * @li NULL instead of the genlist object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_highlight_mode_get with invalid value instead of the genlist item object
+ *
+ * @passcondition
+ * @li Test passes if returned value is EINA_FALSE and there is no segmentation fault
+ * @}
+ */
+
+START_TEST(utc_elm_genlist_highlight_mode_get_n_01)
+{
+ if (elm_genlist_highlight_mode_get(NULL) != EINA_FALSE)
+ {
+ TEST_FAIL("Test has failed..");
+ }
+
+ TEST_PASS("Test has passed..");
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_genlist_highlight_mode_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_genlist_highlight_mode_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_genlist_highlight_mode_set_p_01);
+ tcase_add_test(tcase, utc_elm_genlist_highlight_mode_set_n_01);
+ tcase_add_test(tcase, utc_elm_genlist_highlight_mode_get_n_01);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_highlight_mode_set elm_genlist_highlight_mode_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-#define TEST_FAIL(MESSAGE) \
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : %s", __FILE__, __LINE__, MESSAGE); \
- return;
-
-
-#define TEST_PASS(MESSAGE) \
- printf("[TEST_PASS]:: %s[%d] : %s\n", __FILE__, __LINE__, MESSAGE); \
-
-
-
-/**
- * @addtogroup elm_genlist_highlight_mode_set
- * @{
- * @objective Positive Test case 01 checks if function call with valid value to find out
- * whether the genlist items' should be highlighted when item selected and works properly
- * and without segmentation fault
- * @n Input Data:
- * @li the genlist object
- * @li highlight @c EINA_TRUE to enable highlighting or @c EINA_FALSE to disable it
- *
- * @procedure
- * @step 1 Call elm_genlist_highlight_mode_set to set that the genlist items' should NOT be
- * highlighted when item selected (argument highlight = EINA_FALSE)
- * @step 2 Call elm_genlist_highlight_mode_set for genlist, result must be EINA_FALSE
- * @step 3 Call elm_genlist_highlight_mode_set to set that the genlist items' should be
- * highlighted when item selected (argument highlight = EINA_TRUE)
- * @step 4 Call elm_genlist_highlight_mode_set for genlist, result must be EINA_FALSE
- *
- * @passcondition
- * @li Test passes if returned value by calling the function elm_genlist_highlight_mode_get
- * is same as specified in argument of function elm_genlist_highlight_mode_set
- * and there is no segmentation fault
- * @}
- */
-
-START_TEST(utc_elm_genlist_highlight_mode_set_p_01)
-{
- if (main_win == NULL || genlist == NULL)
- {
- TEST_FAIL("Test has failed..");
- }
-
-
- const Eina_Bool highlight_FALSE = EINA_FALSE;
- elm_genlist_highlight_mode_set(genlist, highlight_FALSE);
- if (elm_genlist_highlight_mode_get(genlist) != highlight_FALSE)
- {
- TEST_FAIL("Test has failed..");
- }
-
- const Eina_Bool highlight_TRUE = EINA_TRUE;
- elm_genlist_highlight_mode_set(genlist, highlight_TRUE);
- if (elm_genlist_highlight_mode_get(genlist) != highlight_TRUE)
- {
- TEST_FAIL("Test has failed..");
- }
-
- TEST_PASS("Test has passed..");
-}
-END_TEST
-
-/**
- * @addtogroup elm_genlist_highlight_mode_set
- * @{
- * @objective Negative Test 01 case checks if function call with invalid value to check
- * whether the genlist items' should be highlighted when item selected.
- * @n Input Data:
- * @li NULL instead of the genlist object
- * @li highlight @c EINA_TRUE to enable highlighting or @c EINA_FALSE to disable it
- *
- * @procedure
- * @step 1 Call elm_genlist_highlight_mode_set with invalid value instead of the genlist item object
- *
- * @passcondition
- * @li Test passes if there is no segmentation fault
- * @}
- */
-
-START_TEST(utc_elm_genlist_highlight_mode_set_n_01)
-{
-
- elm_genlist_highlight_mode_set(NULL, EINA_FALSE);
- elm_genlist_highlight_mode_set(NULL, EINA_TRUE);
-
- TEST_PASS("Test has passed..");
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_genlist_highlight_mode_set()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_highlight_mode_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_highlight_mode_set_p_01);
- tcase_add_test(tcase, utc_elm_genlist_highlight_mode_set_n_01);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_homogeneous_get elm_genlist_homogeneous_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_homogeneous_get
- * @{
- * @objective Positive Test case checks if function call with valid value to get whether
- * the homogeneous mode is enabled works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist object
- *
- * @procedure
- * @step 1 Enable the homogeneous mode for a given genlist widget
- * @step 2 Call elm_genlist_homogeneous_get with valid value
- * @step 3 Disable the homogeneous mode for a given genlist widget
- * @step 4 Call elm_genlist_homogeneous_get with valid value
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_homogeneous_get_p)
-{
- if (main_win == NULL || genlist == NULL)
- {
- return;
- }
-
- Eina_Bool ret = EINA_FALSE;
-
- elm_genlist_homogeneous_set(genlist, EINA_TRUE);
- ret = elm_genlist_homogeneous_get(genlist);
- if (ret == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- elm_genlist_homogeneous_set(genlist, EINA_FALSE);
- ret = elm_genlist_homogeneous_get(genlist);
- if (ret == 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_genlist_homogeneous_get
- * @{
- * @objective Negative Test case checks if function call with invalid value to get whether
- * the homogeneous mode is enabled works properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the genlist object
- *
- * @procedure
- * @step 1 Call elm_genlist_homogeneous_get with invalid value instead of the genlist object
- *
- * @passcondition
- * @li Test passes if returned value is EINA_FALSE and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_homogeneous_get_n)
-{
- if (TEST_FAIL == UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_genlist_homogeneous_get, genlist))
- {
- 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_genlist_homogeneous_get()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_homogeneous_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_homogeneous_get_p);
- tcase_add_test(tcase, utc_elm_genlist_homogeneous_get_n);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+#include "../../utc_negative_unitest.h"
+static Evas_Object *main_win = NULL, *genlist = NULL;
+
+/**
+ * @addtogroup elm_genlist
+ * @{
+ * @defgroup elm_genlist_homogeneous_set elm_genlist_homogeneous_set()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show main window
+ * @step 3 Add a genlist to the main window
+ */
+
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ }
+ evas_object_show(main_win);
+ genlist = elm_genlist_add(main_win);
+ if (genlist == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
+ }
+}
+
+static void
+teardown(void)
+{
+ if (main_win != NULL)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_genlist_homogeneous_set
+ * @{
+ * @objective Positive Test case checks if function call with valid values to set whether
+ * the homogeneous mode is enabled works properly and without segmentation fault
+ * @n Input Data:
+ * @li the genlist object
+ * @li EINA_TRUE, EINA_FALSE as the flag's value to assume the items within the genlist are of the same
+ * height and width (EINA_TRUE = on, EINA_FALSE = off). Default is EINA_FALSE
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_homogeneous_set with EINA_TRUE as the flag's value to assume the items within the genlist are of the same height and width
+ * @step 2 Get whether the homogeneous mode is enabled
+ * @step 3 Call elm_genlist_homogeneous_set with EINA_FALSE as the flag's value to assume the items within the genlist are of the same height and width
+ * @step 4 Get whether the homogeneous mode is enabled
+ *
+ * @passcondition
+ * @li Test passes if returned value is same as specified value and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_homogeneous_set_p)
+{
+ Eina_Bool ret = EINA_FALSE;
+
+ elm_genlist_homogeneous_set(genlist, EINA_TRUE);
+ ret = elm_genlist_homogeneous_get(genlist);
+ if (ret == EINA_FALSE)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ elm_genlist_homogeneous_set(genlist, EINA_FALSE);
+ ret = elm_genlist_homogeneous_get(genlist);
+ if (ret == 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_genlist_homogeneous_set
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to set whether
+ * the homogeneous mode is enabled works without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the genlist object
+ * @li EINA_TRUE as the flag's value to assume the items within the genlist are of the same
+ * height and width (EINA_TRUE = on, EINA_FALSE = off). Default is EINA_FALSE
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_homogeneous_set with invalid value instead of the genlist object
+ *
+ * @passcondition
+ * @li Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_homogeneous_set_n)
+{
+ CREATE_CHECKED_ARGS_ARRAY(1, 0)
+ UNITEST_FUNC_NEG_CA(elm_genlist_homogeneous_set, genlist, EINA_TRUE)
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_genlist_homogeneous_get
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to get whether
+ * the homogeneous mode is enabled works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the genlist object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_homogeneous_get with invalid value instead of the genlist object
+ *
+ * @passcondition
+ * @li Test passes if returned value is EINA_FALSE and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_homogeneous_get_n)
+{
+ if (TEST_FAIL == UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_genlist_homogeneous_get, genlist))
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_genlist_homogeneous_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_genlist_homogeneous_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_genlist_homogeneous_set_p);
+ tcase_add_test(tcase, utc_elm_genlist_homogeneous_set_n);
+ tcase_add_test(tcase, utc_elm_genlist_homogeneous_get_n);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_homogeneous_set elm_genlist_homogeneous_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_homogeneous_set
- * @{
- * @objective Positive Test case checks if function call with valid values to set whether
- * the homogeneous mode is enabled works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist object
- * @li EINA_TRUE, EINA_FALSE as the flag's value to assume the items within the genlist are of the same
- * height and width (EINA_TRUE = on, EINA_FALSE = off). Default is EINA_FALSE
- *
- * @procedure
- * @step 1 Call elm_genlist_homogeneous_set with EINA_TRUE as the flag's value to assume the items within the genlist are of the same height and width
- * @step 2 Get whether the homogeneous mode is enabled
- * @step 3 Call elm_genlist_homogeneous_set with EINA_FALSE as the flag's value to assume the items within the genlist are of the same height and width
- * @step 4 Get whether the homogeneous mode is enabled
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_homogeneous_set_p)
-{
- if (main_win == NULL || genlist == NULL)
- {
- return;
- }
-
- Eina_Bool ret = EINA_FALSE;
-
- elm_genlist_homogeneous_set(genlist, EINA_TRUE);
- ret = elm_genlist_homogeneous_get(genlist);
- if (ret == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- elm_genlist_homogeneous_set(genlist, EINA_FALSE);
- ret = elm_genlist_homogeneous_get(genlist);
- if (ret == 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_genlist_homogeneous_set
- * @{
- * @objective Negative Test case checks if function call with invalid value to set whether
- * the homogeneous mode is enabled works without segmentation fault
- * @n Input Data:
- * @li NULL instead of the genlist object
- * @li EINA_TRUE as the flag's value to assume the items within the genlist are of the same
- * height and width (EINA_TRUE = on, EINA_FALSE = off). Default is EINA_FALSE
- *
- * @procedure
- * @step 1 Call elm_genlist_homogeneous_set with invalid value instead of the genlist object
- *
- * @passcondition
- * @li Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_homogeneous_set_n)
-{
- CREATE_CHECKED_ARGS_ARRAY(1, 0)
- UNITEST_FUNC_NEG_CA(elm_genlist_homogeneous_set, genlist, EINA_TRUE)
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_genlist_homogeneous_set()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_homogeneous_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_homogeneous_set_p);
- tcase_add_test(tcase, utc_elm_genlist_homogeneous_set_n);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_item_class_free elm_genlist_item_class_free()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
-
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
-
- evas_object_show(main_win);
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_item_class_free
- * @{
- * @objective Positive Test case 1 checks whether after removing and item class in a genlist
- * the delete_me flag is on
- * @n Input Data:
- * @li the genlist item class object
- *
- * @procedure
- * @step 1 Call elm_genlist_item_class_new to create a new genlist item class in a given genlist
- * @step 2 Call elm_genlist_item_class_free to remove an item class
- * @step 3 Check whether delete_me is on
- *
- * @passcondition
- * @li Test passes if delete_me is on, and no segmentation fault was detected
- * @}
- */
-START_TEST(utc_elm_genlist_item_class_free_p_1)
-{
- if (main_win == NULL)
- {
- return;
- }
-
- Elm_Genlist_Item_Class* itc = elm_genlist_item_class_new();
- if (itc == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- elm_genlist_item_class_ref(itc);
- elm_genlist_item_class_free(itc);
- if (!itc->delete_me)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- elm_genlist_item_class_free(itc);
- itc = NULL;
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_genlist_item_class_free
- * @{
- * @objective Positive Test case 2 checks whether after removing and item class in a genlist
- * the reference count is decremented when a few elements were added to genlist
- * @n Input Data:
- * @li the genlist item class object
- *
- * @procedure
- * @step 1 Call elm_genlist_item_class_new to create a new genlist item class in a given genlist
- * @step 2 Call elm_genlist_item_append to add multiple items to genlist
- * @step 3 Call elm_genlist_item_class_free to decrement refcount
- * @step 3 Check whether refcount was decremented
- *
- * @passcondition
- * @li Test passes if refscount is equal to N
- * @}
- */
-START_TEST(utc_elm_genlist_item_class_free_p_2)
-{
- if (main_win == NULL)
- {
- return;
- }
-
- Elm_Genlist_Item_Class* itc = elm_genlist_item_class_new();
- if (itc == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- unsigned int i = 0, N = 3;
- for (; i != N; ++i)
- {
- elm_genlist_item_append(genlist, itc,
- (void *)(long)i, NULL,
- ELM_GENLIST_ITEM_NONE,
- NULL, NULL);
- }
-
- elm_genlist_item_class_free(itc);
- if (N != itc->refcount)
- {
- 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_genlist_item_class_free
- * @{
- * @objective Negative Test case checks if function call with invalid value works without segmentation fault
- * @n Input Data:
- * @li the genlist object
- *
- * @procedure
- * @step 1 Call elm_genlist_item_class_free with invalid value instead of the genlist object
- *
- * @passcondition
- * @li Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_class_free_n_1)
-{
- elm_genlist_item_class_free(NULL);
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-/**
-*@}
-*/
-
-TCase * _utc_elm_genlist_item_class_free()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_item_class_free");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_item_class_free_p_1);
- tcase_add_test(tcase, utc_elm_genlist_item_class_free_p_2);
- tcase_add_test(tcase, utc_elm_genlist_item_class_free_n_1);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_item_class_new elm_genlist_item_class_new()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
-
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_item_class_new
- * @{
- * @objective Positive Test case 1 checks whether item class object is created properly
- * @n Input Data:
- * @li void
- *
- * @procedure
- * @step 1 Call elm_genlist_item_class_new to create a new genlist item class in a given genlist widget
- * @step 2 Check whether created object isn't equal to NULL
- *
- * @passcondition
- * @li Test passes if created object isn't equal to NULL
- * @}
- */
-START_TEST(utc_elm_genlist_item_class_new_p_1)
-{
- if (main_win == NULL)
- {
- return;
- }
-
- Elm_Genlist_Item_Class* itc = elm_genlist_item_class_new();
- if (NULL == itc)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create genlist item class..", __FILE__, __LINE__);
- return;
- }
-
- elm_genlist_item_class_free(itc);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_genlist_item_class_new
- * @{
- * @objective Positive Test case 2 checks whether item class object creation setup reference counter to 1
- * @n Input Data:
- * @li void
- *
- * @procedure
- * @step 1 Call elm_genlist_item_class_new to create a new genlist item class in a given genlist widget
- * @step 2 Check whether refcounter is equal to 1
- *
- * @passcondition
- * @li Test passes if reference counter of item class object is equal to 1
- * @}
- */
-START_TEST(utc_elm_genlist_item_class_new_p_2)
-{
- if (main_win == NULL)
- {
- return;
- }
-
- Elm_Genlist_Item_Class* itc = elm_genlist_item_class_new();
- if (itc == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- if (1 != itc->refcount)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- elm_genlist_item_class_free(itc);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-/**
-*@}
-*/
-
-TCase * _utc_elm_genlist_item_class_new()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_item_class_new");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_item_class_new_p_1);
- tcase_add_test(tcase, utc_elm_genlist_item_class_new_p_2);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+#include "../../utc_negative_unitest.h"
+static Evas_Object *main_win = NULL, *genlist = NULL;
+
+/**
+ * @addtogroup elm_genlist
+ * @{
+ * @defgroup elm_genlist_item_class_free elm_genlist_item_class_free()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show main window
+ * @step 3 Add a genlist to the main window
+ */
+
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ }
+
+ genlist = elm_genlist_add(main_win);
+ if (genlist == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
+ }
+
+ evas_object_show(main_win);
+}
+
+static void
+teardown(void)
+{
+ if (main_win != NULL)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_genlist_item_class_free
+ * @{
+ * @objective Positive Test case 1 checks whether after removing and item class in a genlist
+ * the delete_me flag is on
+ * @n Input Data:
+ * @li the genlist item class object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_item_class_new to create a new genlist item class in a given genlist
+ * @step 2 Call elm_genlist_item_class_free to remove an item class
+ * @step 3 Check whether delete_me is on
+ *
+ * @passcondition
+ * @li Test passes if delete_me is on, and no segmentation fault was detected
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_class_free_p_1)
+{
+ Elm_Genlist_Item_Class* itc = elm_genlist_item_class_new();
+ if (itc == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ elm_genlist_item_class_ref(itc);
+ elm_genlist_item_class_free(itc);
+ if (!itc->delete_me)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ elm_genlist_item_class_free(itc);
+ itc = NULL;
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_genlist_item_class_free
+ * @{
+ * @objective Positive Test case 2 checks whether after removing and item class in a genlist
+ * the reference count is decremented when a few elements were added to genlist
+ * @n Input Data:
+ * @li the genlist item class object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_item_class_new to create a new genlist item class in a given genlist
+ * @step 2 Call elm_genlist_item_append to add multiple items to genlist
+ * @step 3 Call elm_genlist_item_class_free to decrement refcount
+ * @step 3 Check whether refcount was decremented
+ *
+ * @passcondition
+ * @li Test passes if refscount is equal to N
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_class_free_p_2)
+{
+ Elm_Genlist_Item_Class* itc = elm_genlist_item_class_new();
+ if (itc == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ unsigned int i = 0, N = 3;
+ for (; i != N; ++i)
+ {
+ elm_genlist_item_append(genlist, itc,
+ (void *)(long)i, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ NULL, NULL);
+ }
+
+ elm_genlist_item_class_free(itc);
+ if (N != itc->refcount)
+ {
+ 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_genlist_item_class_free
+ * @{
+ * @objective Negative Test case checks if function call with invalid value works without segmentation fault
+ * @n Input Data:
+ * @li the genlist object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_item_class_free with invalid value instead of the genlist object
+ *
+ * @passcondition
+ * @li Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_class_free_n_1)
+{
+ elm_genlist_item_class_free(NULL);
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+/**
+*@}
+*/
+
+TCase * _utc_elm_genlist_item_class_new_free()
+{
+ TCase *tcase = tcase_create("utc_elm_genlist_item_class_new_free");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_genlist_item_class_free_p_1);
+ tcase_add_test(tcase, utc_elm_genlist_item_class_free_p_2);
+ tcase_add_test(tcase, utc_elm_genlist_item_class_free_n_1);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-static Evas_Object *main_win = NULL, *box = NULL, *genlist = NULL;
-static Elm_Genlist_Item_Class *gic = NULL;
-static Elm_Object_Item *item = NULL;
-
-static Eina_Bool set_elm_genlist_item_cursor_engine_only_status = EINA_FALSE;
-static Eina_Bool set_elm_genlist_item_cursor_theme_only_status = EINA_FALSE;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_item_cursor_engine_only_get elm_genlist_item_cursor_engine_only_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create a main window
- * @step 3 Add a box to the main window
- * @step 4 Set a box as a resize object of the main window
- * @step 5 Add a genlist to the main window and set up it
- * @step 6 Add a genlist's item class in the genlist
- * @step 7 Append an item in the genlist
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
-
- UTC_ELM_INIT();
-
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
-
- box = elm_box_add(main_win);
- if (box == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a box to the main window..", __FILE__, __LINE__);
- return;
- }
-
- elm_win_resize_object_add(main_win, box);
-
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
-
- evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_box_pack_end(box, genlist);
- gic = elm_genlist_item_class_new();
- if (gic == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
- return;
- }
-
- item = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- if (item == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- evas_object_show(box);
- evas_object_show(genlist);
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-static Eina_Bool _set_elm_genlist_item_cursor_engine_only_timer_cb(void* data)
-{
- const Eina_Bool engine_only = EINA_TRUE;
-
- elm_genlist_item_cursor_engine_only_set(item, engine_only);
- if (elm_genlist_item_cursor_engine_only_get(item) != engine_only)
- {
- set_elm_genlist_item_cursor_engine_only_status = EINA_FALSE;
- return ECORE_CALLBACK_CANCEL;
- }
-
- set_elm_genlist_item_cursor_engine_only_status = EINA_TRUE;
-
- return ECORE_CALLBACK_CANCEL;
-}
-
-static Eina_Bool _set_elm_genlist_item_cursor_theme_only_timer_cb(void* data)
-{
- const Eina_Bool widget_theme_only = EINA_FALSE;
-
- elm_genlist_item_cursor_engine_only_set(item, widget_theme_only);
- if (elm_genlist_item_cursor_engine_only_get(item) != widget_theme_only)
- {
- set_elm_genlist_item_cursor_theme_only_status = EINA_FALSE;
- return ECORE_CALLBACK_CANCEL;
- }
-
- set_elm_genlist_item_cursor_theme_only_status = EINA_TRUE;
-
- return ECORE_CALLBACK_CANCEL;
-}
-
-static Eina_Bool _quit_timer_cb(void *data)
-{
- ecore_main_loop_quit();
-
- return ECORE_CALLBACK_CANCEL;
-}
-
-/**
- * @addtogroup elm_genlist_item_cursor_engine_only_get
- * @{
- * @objective Positive Test case 01: checks if function call with valid values that
- * gets if the (custom) cursor for a given genlist item is being searched
- * in its theme, also, or is only relying on the rendering engine,
- * works properly and without segmentation fault
- * @n Input Data:
- * @li it a genlist item
- *
- * @procedure
- * @step 1 set custom cursor to the item
- * @step 2 set timer to set EINA_TRUE to have cursors looked for only on those
- * provided by the rendering engine
- * @step 3 set timer to set EINA_TRUE to have cursors looked for only on those
- * provided by the rendering engine
- * @step 4 set timer to set EINA_FALSE to have them searched on the widget's theme
- * @step 5 set timer to quit from main loop
- * @step 6 runs the application main loop
- * @step 7 check whether the values were set
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value was set
- * and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_cursor_engine_only_get_p_01)
-{
- if (main_win == NULL || genlist == NULL || gic == NULL || item == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
-
- const char *cursor = "cursor";
- const char *cursor_style_transparent = "cursor_style_transparent";
- elm_genlist_item_cursor_set(item, cursor);
- elm_genlist_item_cursor_style_set(item, cursor_style_transparent);
-
- const double set_timer_cb_expired = 1.0;
- const double unset_timer_cb_expired = 3.0;
- const double get_and_quit_timer_cb_expired = 5.0;
-
- ecore_timer_add(set_timer_cb_expired, _set_elm_genlist_item_cursor_engine_only_timer_cb, NULL);
- ecore_timer_add(set_timer_cb_expired, _set_elm_genlist_item_cursor_theme_only_timer_cb, NULL);
- ecore_timer_add(get_and_quit_timer_cb_expired, _quit_timer_cb, NULL);
-
- ecore_main_loop_begin();
-
- if (set_elm_genlist_item_cursor_engine_only_status != EINA_TRUE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- if (set_elm_genlist_item_cursor_theme_only_status != 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_genlist_item_cursor_engine_only_get
- * @{
- * @objective Negative Test case 01: checks if function call with invalid value
- * (NULL instead of genlist item) works without segmentation fault
- * @n Input Data:
- * @li it a genlist item(NULL instead)
- *
- * @procedure
- * @step 1 Call function elm_genlist_item_cursor_engine_only_get with NULL
- * instead of genlist item
- *
- * @passcondition
- * @li Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_cursor_engine_only_get_n_01)
-{
-
- Elm_Object_Item *it = NULL;
- elm_genlist_item_cursor_engine_only_get(it);
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_genlist_item_cursor_engine_only_get()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_item_cursor_engine_only_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_item_cursor_engine_only_get_p_01);
- tcase_add_test(tcase, utc_elm_genlist_item_cursor_engine_only_get_n_01);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+#include <string.h>
+static Evas_Object *main_win = NULL, *box = NULL, *genlist = NULL;
+static Elm_Genlist_Item_Class *gic = NULL;
+static Elm_Object_Item *item = NULL;
+
+static Eina_Bool set_elm_genlist_item_cursor_engine_only_status = EINA_FALSE;
+static Eina_Bool set_elm_genlist_item_cursor_theme_only_status = EINA_FALSE;
+
+/**
+ * @addtogroup elm_genlist
+ * @{
+ * @defgroup elm_genlist_item_cursor_engine_only_set elm_genlist_item_cursor_engine_only_set()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create a main window
+ * @step 3 Add a box to the main window
+ * @step 4 Set a box as a resize object of the main window
+ * @step 5 Add a genlist to the main window and set up it
+ * @step 6 Add a genlist's item class in the genlist
+ * @step 7 Append an item in the genlist
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+
+ UTC_ELM_INIT();
+
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ }
+
+ box = elm_box_add(main_win);
+ if (box == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a box to the main window..", __FILE__, __LINE__);
+ }
+
+ elm_win_resize_object_add(main_win, box);
+
+ genlist = elm_genlist_add(main_win);
+ if (genlist == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
+ }
+
+ evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_box_pack_end(box, genlist);
+ gic = elm_genlist_item_class_new();
+ if (gic == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
+ }
+
+ item = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ if (item == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
+ }
+ evas_object_show(main_win);
+ evas_object_show(box);
+ evas_object_show(genlist);
+}
+
+static void
+teardown(void)
+{
+ if (main_win != NULL)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool _set_elm_genlist_item_cursor_engine_only_timer_cb(void* data)
+{
+ const Eina_Bool engine_only = EINA_TRUE;
+
+ elm_genlist_item_cursor_engine_only_set(item, engine_only);
+ if (elm_genlist_item_cursor_engine_only_get(item) != engine_only)
+ {
+ set_elm_genlist_item_cursor_engine_only_status = EINA_FALSE;
+ return ECORE_CALLBACK_CANCEL;
+ }
+
+ set_elm_genlist_item_cursor_engine_only_status = EINA_TRUE;
+
+ return ECORE_CALLBACK_CANCEL;
+}
+
+static Eina_Bool _set_elm_genlist_item_cursor_theme_only_timer_cb(void* data)
+{
+ const Eina_Bool widget_theme_only = EINA_FALSE;
+
+ elm_genlist_item_cursor_engine_only_set(item, widget_theme_only);
+ if (elm_genlist_item_cursor_engine_only_get(item) != widget_theme_only)
+ {
+ set_elm_genlist_item_cursor_theme_only_status = EINA_FALSE;
+ return ECORE_CALLBACK_CANCEL;
+ }
+
+ set_elm_genlist_item_cursor_theme_only_status = EINA_TRUE;
+
+ return ECORE_CALLBACK_CANCEL;
+}
+
+static Eina_Bool _quit_timer_cb(void *data)
+{
+ ecore_main_loop_quit();
+
+ return ECORE_CALLBACK_CANCEL;
+}
+
+/**
+ * @addtogroup elm_genlist_item_cursor_engine_only_set
+ * @{
+ * @objective Positive Test case 01: checks if function call with valid values that
+ * sets if the (custom) cursor for a given genlist item should be searched in
+ * its theme, also, or should only rely on the rendering engine,
+ * works properly and without segmentation fault
+ * @n Input Data:
+ * @li it item with custom (custom) cursor already set on
+ * @li engine_only Use EINA_TRUE to have cursors looked for
+ * only on those provided by the rendering engine, EINA_FALSE to
+ * have them searched on the widget's theme, as well.
+ *
+ * @procedure
+ * @step 1 set custom cursor to the item
+ * @step 2 set timer to set EINA_TRUE to have cursors looked for only on those
+ * provided by the rendering engine
+ * @step 3 set timer to set EINA_TRUE to have cursors looked for only on those
+ * provided by the rendering engine
+ * @step 4 set timer to set EINA_FALSE to have them searched on the widget's theme
+ * @step 5 set timer to quit from main loop
+ * @step 6 runs the application main loop
+ * @step 7 check whether the values were set
+ *
+ * @passcondition
+ * @li Test passes if returned value is same as specified value was set
+ * and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_cursor_engine_only_set_p_01)
+{
+ const char *cursor = "cursor";
+ const char *cursor_style_transparent = "cursor_style_transparent";
+ elm_genlist_item_cursor_set(item, cursor);
+ elm_genlist_item_cursor_style_set(item, cursor_style_transparent);
+
+ const double set_engine_timer_cb_expired = 0.1;
+ const double set_theme_timer_cb_expired = 0.2;
+ const double get_and_quit_timer_cb_expired = 0.3;
+
+ ecore_timer_add(set_engine_timer_cb_expired, _set_elm_genlist_item_cursor_engine_only_timer_cb, NULL);
+ ecore_timer_add(set_theme_timer_cb_expired, _set_elm_genlist_item_cursor_theme_only_timer_cb, NULL);
+ ecore_timer_add(get_and_quit_timer_cb_expired, _quit_timer_cb, NULL);
+
+ ecore_main_loop_begin();
+
+ if (set_elm_genlist_item_cursor_engine_only_status != EINA_TRUE)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ if (set_elm_genlist_item_cursor_theme_only_status != 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_genlist_item_cursor_engine_only_set
+ * @{
+ * @objective Negative Test case 01: checks if function call with invalid value
+ * (NULL instead of genlist item) works without segmentation fault
+ * @n Input Data:
+ * @li it item with custom (custom) cursor already set on(NULL instead)
+ * @li engine_only Use EINA_TRUE to have cursors looked for
+ * only on those provided by the rendering engine, EINA_FALSE to
+ * have them searched on the widget's theme, as well.
+ *
+ * @procedure
+ * @step 1 Call function elm_genlist_item_cursor_engine_only_set with NULL
+ * instead of genlist item
+ *
+ * @passcondition
+ * @li Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_cursor_engine_only_set_n_01)
+{
+
+ Elm_Object_Item *it = NULL;
+ Eina_Bool engine_only = EINA_TRUE;
+ elm_genlist_item_cursor_engine_only_set(it, engine_only);
+
+ engine_only = EINA_FALSE;
+ elm_genlist_item_cursor_engine_only_set(it, engine_only);
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_genlist_item_cursor_engine_only_get
+ * @{
+ * @objective Negative Test case 01: checks if function call with invalid value
+ * (NULL instead of genlist item) works without segmentation fault
+ * @n Input Data:
+ * @li it a genlist item(NULL instead)
+ *
+ * @procedure
+ * @step 1 Call function elm_genlist_item_cursor_engine_only_get with NULL
+ * instead of genlist item
+ *
+ * @passcondition
+ * @li Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_cursor_engine_only_get_n_01)
+{
+ Elm_Object_Item *it = NULL;
+ elm_genlist_item_cursor_engine_only_get(it);
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_genlist_item_cursor_engine_only_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_genlist_item_cursor_engine_only_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_genlist_item_cursor_engine_only_set_p_01);
+ tcase_add_test(tcase, utc_elm_genlist_item_cursor_engine_only_set_n_01);
+ tcase_add_test(tcase, utc_elm_genlist_item_cursor_engine_only_get_n_01);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include <string.h>
-static Evas_Object *main_win = NULL, *box = NULL, *genlist = NULL;
-static Elm_Genlist_Item_Class *gic = NULL;
-static Elm_Object_Item *item = NULL;
-
-static Eina_Bool set_elm_genlist_item_cursor_engine_only_status = EINA_FALSE;
-static Eina_Bool set_elm_genlist_item_cursor_theme_only_status = EINA_FALSE;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_item_cursor_engine_only_set elm_genlist_item_cursor_engine_only_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create a main window
- * @step 3 Add a box to the main window
- * @step 4 Set a box as a resize object of the main window
- * @step 5 Add a genlist to the main window and set up it
- * @step 6 Add a genlist's item class in the genlist
- * @step 7 Append an item in the genlist
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
-
- UTC_ELM_INIT();
-
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
-
- box = elm_box_add(main_win);
- if (box == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a box to the main window..", __FILE__, __LINE__);
- return;
- }
-
- elm_win_resize_object_add(main_win, box);
-
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
-
- evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_box_pack_end(box, genlist);
- gic = elm_genlist_item_class_new();
- if (gic == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
- return;
- }
-
- item = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- if (item == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- evas_object_show(box);
- evas_object_show(genlist);
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-static Eina_Bool _set_elm_genlist_item_cursor_engine_only_timer_cb(void* data)
-{
- const Eina_Bool engine_only = EINA_TRUE;
-
- elm_genlist_item_cursor_engine_only_set(item, engine_only);
- if (elm_genlist_item_cursor_engine_only_get(item) != engine_only)
- {
- set_elm_genlist_item_cursor_engine_only_status = EINA_FALSE;
- return ECORE_CALLBACK_CANCEL;
- }
-
- set_elm_genlist_item_cursor_engine_only_status = EINA_TRUE;
-
- return ECORE_CALLBACK_CANCEL;
-}
-
-static Eina_Bool _set_elm_genlist_item_cursor_theme_only_timer_cb(void* data)
-{
- const Eina_Bool widget_theme_only = EINA_FALSE;
-
- elm_genlist_item_cursor_engine_only_set(item, widget_theme_only);
- if (elm_genlist_item_cursor_engine_only_get(item) != widget_theme_only)
- {
- set_elm_genlist_item_cursor_theme_only_status = EINA_FALSE;
- return ECORE_CALLBACK_CANCEL;
- }
-
- set_elm_genlist_item_cursor_theme_only_status = EINA_TRUE;
-
- return ECORE_CALLBACK_CANCEL;
-}
-
-static Eina_Bool _quit_timer_cb(void *data)
-{
- ecore_main_loop_quit();
-
- return ECORE_CALLBACK_CANCEL;
-}
-
-/**
- * @addtogroup elm_genlist_item_cursor_engine_only_set
- * @{
- * @objective Positive Test case 01: checks if function call with valid values that
- * sets if the (custom) cursor for a given genlist item should be searched in
- * its theme, also, or should only rely on the rendering engine,
- * works properly and without segmentation fault
- * @n Input Data:
- * @li it item with custom (custom) cursor already set on
- * @li engine_only Use EINA_TRUE to have cursors looked for
- * only on those provided by the rendering engine, EINA_FALSE to
- * have them searched on the widget's theme, as well.
- *
- * @procedure
- * @step 1 set custom cursor to the item
- * @step 2 set timer to set EINA_TRUE to have cursors looked for only on those
- * provided by the rendering engine
- * @step 3 set timer to set EINA_TRUE to have cursors looked for only on those
- * provided by the rendering engine
- * @step 4 set timer to set EINA_FALSE to have them searched on the widget's theme
- * @step 5 set timer to quit from main loop
- * @step 6 runs the application main loop
- * @step 7 check whether the values were set
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value was set
- * and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_cursor_engine_only_set_p_01)
-{
- if (main_win == NULL || genlist == NULL || gic == NULL || item == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
-
- const char *cursor = "cursor";
- const char *cursor_style_transparent = "cursor_style_transparent";
- elm_genlist_item_cursor_set(item, cursor);
- elm_genlist_item_cursor_style_set(item, cursor_style_transparent);
-
- const double set_timer_cb_expired = 1.0;
- const double unset_timer_cb_expired = 2.0;
- const double get_and_quit_timer_cb_expired = 3.0;
-
- ecore_timer_add(set_timer_cb_expired, _set_elm_genlist_item_cursor_engine_only_timer_cb, NULL);
- ecore_timer_add(set_timer_cb_expired, _set_elm_genlist_item_cursor_theme_only_timer_cb, NULL);
- ecore_timer_add(get_and_quit_timer_cb_expired, _quit_timer_cb, NULL);
-
- ecore_main_loop_begin();
-
- if (set_elm_genlist_item_cursor_engine_only_status != EINA_TRUE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- if (set_elm_genlist_item_cursor_theme_only_status != 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_genlist_item_cursor_engine_only_set
- * @{
- * @objective Negative Test case 01: checks if function call with invalid value
- * (NULL instead of genlist item) works without segmentation fault
- * @n Input Data:
- * @li it item with custom (custom) cursor already set on(NULL instead)
- * @li engine_only Use EINA_TRUE to have cursors looked for
- * only on those provided by the rendering engine, EINA_FALSE to
- * have them searched on the widget's theme, as well.
- *
- * @procedure
- * @step 1 Call function elm_genlist_item_cursor_engine_only_set with NULL
- * instead of genlist item
- *
- * @passcondition
- * @li Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_cursor_engine_only_set_n_01)
-{
-
- Elm_Object_Item *it = NULL;
- Eina_Bool engine_only = EINA_TRUE;
- elm_genlist_item_cursor_engine_only_set(it, engine_only);
-
- engine_only = EINA_FALSE;
- elm_genlist_item_cursor_engine_only_set(it, engine_only);
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_genlist_item_cursor_engine_only_set()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_item_cursor_engine_only_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_item_cursor_engine_only_set_p_01);
- tcase_add_test(tcase, utc_elm_genlist_item_cursor_engine_only_set_n_01);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include <string.h>
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *box = NULL, *genlist = NULL;
-static Elm_Genlist_Item_Class *gic = NULL;
-static Elm_Object_Item *item = NULL;
-static const char *ret = NULL;
-static const char *cursor = "boat";
-
-Eina_Bool is_passed_n = EINA_FALSE;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_item_cursor_get elm_genlist_item_cursor_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create a main window
- * @step 3 Add a box to the main window
- * @step 4 Set a box as a resize object of the main window
- * @step 5 Add a genlist to the main window and set up it
- * @step 6 Add the genlist at the end of the box's pack list
- * @step 7 Add a genlist's item class in the genlist
- * @step 8 Append an item in the genlist
- * @step 9 Show main window and genlist
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- box = elm_box_add(main_win);
- if (box == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a box to the main window..", __FILE__, __LINE__);
- return;
- }
- elm_win_resize_object_add(main_win, box);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_box_pack_end(box, genlist);
- gic = elm_genlist_item_class_new();
- if (gic == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
- return;
- }
- item = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- if (item == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- evas_object_show(box);
- evas_object_show(genlist);
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-static Eina_Bool _set_timer_cb_p(void* data)
-{
- elm_genlist_item_cursor_set(item, cursor);
- return ECORE_CALLBACK_CANCEL;
-}
-
-static Eina_Bool _get_and_quit_timer_cb_p(void *data)
-{
- ret = elm_genlist_item_cursor_get(item);
- ecore_main_loop_quit();
- return ECORE_CALLBACK_CANCEL;
-}
-
-static Eina_Bool _get_and_quit_timer_cb_n(void* data)
-{
- is_passed_n = EINA_TRUE;
- if (TEST_FAIL == UNITEST_FUNC_NEG_RET(NULL, elm_genlist_item_cursor_get, item))
- {
- is_passed_n = EINA_FALSE;
- }
- ecore_main_loop_quit();
- return ECORE_CALLBACK_CANCEL;
-}
-
-/**
- * @addtogroup elm_genlist_item_cursor_get
- * @{
- * @objective Positive Test case checks if function call with valid value to get the type of
- * mouse pointer/cursor decoration to be shown, when the mouse pointer is over the given
- * genlist widget item, works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist item object
- *
- * @procedure
- * @step 1 Set the type of mouse pointer/cursor decoration as "boat" to be shown while event/processing loop for Elementary is running
- * @step 2 Call elm_genlist_item_cursor_get with valid value while event/processing loop for Elementary is running
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_cursor_get_p)
-{
- if (main_win == NULL || box == NULL || genlist == NULL || gic == NULL || item == NULL)
- {
- return;
- }
-
- ecore_timer_add(2, _set_timer_cb_p, NULL);
- ecore_timer_add(4, _get_and_quit_timer_cb_p, NULL);
- ecore_main_loop_begin();
- if ((ret == NULL) || (strcmp(ret, cursor) != 0))
- {
- 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_genlist_item_cursor_get
- * @{
- * @objective Negative Test case checks if function call with invalid value to get the type of
- * mouse pointer/cursor decoration to be shown, when the mouse pointer is over the given
- * genlist widget item, works properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the genlist item object
- *
- * @procedure
- * @step 1 Call elm_genlist_item_cursor_get with invalid value instead of the genlist item object
- *
- * @passcondition
- * @li Test passes if returned value is NULL and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_cursor_get_n)
-{
- if (main_win == NULL || box == NULL || genlist == NULL || gic == NULL || item == NULL)
- {
- return;
- }
-
- ecore_timer_add(2, _get_and_quit_timer_cb_n, NULL);
- ecore_main_loop_begin();
- if (is_passed_n == 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
-
-/**
- *@}
- */
-
-TCase * _utc_elm_genlist_item_cursor_get()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_item_cursor_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_item_cursor_get_p);
- tcase_add_test(tcase, utc_elm_genlist_item_cursor_get_n);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+#include <string.h>
+#include "../../utc_negative_unitest.h"
+static Evas_Object *main_win = NULL, *box = NULL, *genlist = NULL;
+static Elm_Genlist_Item_Class *gic = NULL;
+static Elm_Object_Item *item = NULL;
+static const char *cursor = "boat";
+static const char *ret = NULL;
+Eina_Bool is_passed_n = EINA_FALSE;
+
+/**
+ * @addtogroup elm_genlist
+ * @{
+ * @defgroup elm_genlist_item_cursor_unset elm_genlist_item_cursor_unset()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create a main window
+ * @step 3 Add a box to the main window
+ * @step 4 Set a box as a resize object of the main window
+ * @step 5 Add a genlist to the main window and set up it
+ * @step 6 Add the genlist at the end of the box's pack list
+ * @step 7 Add a genlist's item class in the genlist
+ * @step 8 Append an item in the genlist
+ * @step 9 Show main window and genlist
+ */
+
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ }
+ box = elm_box_add(main_win);
+ if (box == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a box to the main window..", __FILE__, __LINE__);
+ }
+ elm_win_resize_object_add(main_win, box);
+ genlist = elm_genlist_add(main_win);
+ if (genlist == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
+ }
+ evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_box_pack_end(box, genlist);
+ gic = elm_genlist_item_class_new();
+ if (gic == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
+ }
+ item = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ if (item == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
+ }
+ evas_object_show(main_win);
+ evas_object_show(box);
+ evas_object_show(genlist);
+}
+
+static void
+teardown(void)
+{
+ elm_object_item_del(item);
+ item = NULL;
+
+ if (main_win != NULL)
+ {
+ evas_object_del (main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool _set_timer_cb_p(void* data)
+{
+ elm_genlist_item_cursor_set(item, cursor);
+ return ECORE_CALLBACK_CANCEL;
+}
+
+static Eina_Bool _get_and_quit_timer_cb_p(void *data)
+{
+ ret = elm_genlist_item_cursor_get(item);
+ ecore_main_loop_quit();
+ return ECORE_CALLBACK_CANCEL;
+}
+
+static Eina_Bool _unset_timer_cb_p(void* data)
+{
+ elm_genlist_item_cursor_unset(item);
+ return ECORE_CALLBACK_CANCEL;
+}
+
+static Eina_Bool _set_and_quit_timer_cb_n(void* data)
+{
+ UNITEST_FUNC_NEG(elm_genlist_item_cursor_set, item, cursor)
+ elm_genlist_item_cursor_set(item, "");
+ ecore_main_loop_quit();
+ return ECORE_CALLBACK_CANCEL;
+}
+
+static Eina_Bool _get_and_quit_timer_cb_n(void* data)
+{
+ is_passed_n = EINA_TRUE;
+ if (TEST_FAIL == UNITEST_FUNC_NEG_RET(NULL, elm_genlist_item_cursor_get, item))
+ {
+ is_passed_n = EINA_FALSE;
+ }
+ ecore_main_loop_quit();
+ return ECORE_CALLBACK_CANCEL;
+}
+
+/**
+ * @addtogroup elm_genlist_item_cursor_unset
+ * @{
+ * @objective Positive Test case 01: checks if function call with valid value to set
+ * the style of a given genlist item to default works properly and without segmentation fault
+ * @n Input Data:
+ * @li the genlist item object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_item_cursor_style_set to set starting value
+ * @step 2 Call elm_genlist_item_cursor_unset with valid values to set the style back to default
+ * @step 3 Check if style was changed
+ *
+ * @passcondition
+ * @li Test passes if the value is same as specified value and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_cursor_unset_p_1)
+{
+ ecore_timer_add(0.2, _set_timer_cb_p, NULL);
+ ecore_timer_add(0.4, _get_and_quit_timer_cb_p, NULL);
+ ecore_main_loop_begin();
+ if (ret == NULL || strcmp(ret, cursor))
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ ecore_timer_add(0.2, _unset_timer_cb_p, NULL);
+ ecore_timer_add(0.4, _get_and_quit_timer_cb_p, NULL);
+ ecore_main_loop_begin();
+
+ if (ret)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..%s", __FILE__, __LINE__, ret);
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_genlist_item_cursor_set
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to set the type of
+ * mouse pointer/cursor decoration to be shown, when the mouse pointer is over the given
+ * genlist widget item, works without segmentation fault
+ * @n Input Data:
+ * @li NULL, the genlist item object
+ * @li NULL, "boat", "" as the cursor type's name
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_item_cursor_set with invalid value instead of the genlist item object
+ * @step 2 Call elm_genlist_item_cursor_set with invalid value instead of the cursor type's name
+ * @step 3 Call elm_genlist_item_cursor_set with empty string instead of the cursor type's name
+ *
+ * @passcondition
+ * @li Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_cursor_set_n)
+{
+ ecore_timer_add(0.2, _set_and_quit_timer_cb_n, NULL);
+ ecore_main_loop_begin();
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_genlist_item_cursor_get
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to get the type of
+ * mouse pointer/cursor decoration to be shown, when the mouse pointer is over the given
+ * genlist widget item, works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the genlist item object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_item_cursor_get with invalid value instead of the genlist item object
+ *
+ * @passcondition
+ * @li Test passes if returned value is NULL and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_cursor_get_n)
+{
+ ecore_timer_add(0.2, _get_and_quit_timer_cb_n, NULL);
+ ecore_main_loop_begin();
+ if (is_passed_n == 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_genlist_item_cursor_unset
+ * @{
+ * @objective Negative Test case 01: checks if function call with invalid value to set
+ * the cursor style of a given genlist item to defualt works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the genlist item object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_item_cursor_unset with invalid values
+ *
+ * @passcondition
+ * @li Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_cursor_unset_n_1)
+{
+ UNITEST_FUNC_NEG(elm_genlist_item_cursor_unset, item);
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed.\n", __FILE__, __LINE__);
+
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_genlist_item_cursor_get_set_unset()
+{
+ TCase *tcase = tcase_create("utc_elm_genlist_item_cursor_get_set_unset");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_genlist_item_cursor_unset_p_1);
+ tcase_add_test(tcase, utc_elm_genlist_item_cursor_set_n);
+ tcase_add_test(tcase, utc_elm_genlist_item_cursor_get_n);
+ tcase_add_test(tcase, utc_elm_genlist_item_cursor_unset_n_1);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include <string.h>
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *box = NULL, *genlist = NULL;
-static Elm_Genlist_Item_Class *gic = NULL;
-static Elm_Object_Item *item = NULL;
-static const char *ret = NULL;
-static const char *cursor = "boat";
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_item_cursor_set elm_genlist_item_cursor_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create a main window
- * @step 3 Add a box to the main window
- * @step 4 Set a box as a resize object of the main window
- * @step 5 Add a genlist to the main window and set up it
- * @step 6 Add the genlist at the end of the box's pack list
- * @step 7 Add a genlist's item class in the genlist
- * @step 8 Append an item in the genlist
- * @step 9 Show main window and genlist
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- box = elm_box_add(main_win);
- if (box == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a box to the main window..", __FILE__, __LINE__);
- return;
- }
- elm_win_resize_object_add(main_win, box);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_box_pack_end(box, genlist);
- gic = elm_genlist_item_class_new();
- if (gic == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
- return;
- }
- item = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- if (item == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- evas_object_show(box);
- evas_object_show(genlist);
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-static Eina_Bool _set_timer_cb_p(void* data)
-{
- elm_genlist_item_cursor_set(item, cursor);
- return ECORE_CALLBACK_CANCEL;
-}
-
-static Eina_Bool _get_and_quit_timer_cb_p(void *data)
-{
- ret = elm_genlist_item_cursor_get(item);
- ecore_main_loop_quit();
- return ECORE_CALLBACK_CANCEL;
-}
-
-static Eina_Bool _set_and_quit_timer_cb_n(void* data)
-{
- UNITEST_FUNC_NEG(elm_genlist_item_cursor_set, item, cursor)
- elm_genlist_item_cursor_set(item, "");
- ecore_main_loop_quit();
- return ECORE_CALLBACK_CANCEL;
-}
-
-/**
- * @addtogroup elm_genlist_item_cursor_set
- * @{
- * @objective Positive Test case checks if function call with valid values to set the type of
- * mouse pointer/cursor decoration to be shown, when the mouse pointer is over the given
- * genlist widget item, works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist item object
- * @li "boat" as the cursor type's name
- *
- * @procedure
- * @step 1 Call elm_genlist_item_cursor_set with valid value as "boat"
- * @step 2 Get the type of mouse while event/processing loop for Elementary is running
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_cursor_set_p)
-{
- if (main_win == NULL || box == NULL || genlist == NULL || gic == NULL || item == NULL)
- {
- return;
- }
-
- ecore_timer_add(2, _set_timer_cb_p, NULL);
- ecore_timer_add(4, _get_and_quit_timer_cb_p, NULL);
- ecore_main_loop_begin();
- if ((ret == NULL) || (strcmp(ret, cursor) != 0))
- {
- 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_genlist_item_cursor_set
- * @{
- * @objective Negative Test case checks if function call with invalid value to set the type of
- * mouse pointer/cursor decoration to be shown, when the mouse pointer is over the given
- * genlist widget item, works without segmentation fault
- * @n Input Data:
- * @li NULL, the genlist item object
- * @li NULL, "boat", "" as the cursor type's name
- *
- * @procedure
- * @step 1 Call elm_genlist_item_cursor_set with invalid value instead of the genlist item object
- * @step 2 Call elm_genlist_item_cursor_set with invalid value instead of the cursor type's name
- * @step 3 Call elm_genlist_item_cursor_set with empty string instead of the cursor type's name
- *
- * @passcondition
- * @li Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_cursor_set_n)
-{
- if (main_win == NULL || box == NULL || genlist == NULL || gic == NULL || item == NULL)
- {
- return;
- }
-
- ecore_timer_add(2, _set_and_quit_timer_cb_n, NULL);
- ecore_main_loop_begin();
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_genlist_item_cursor_set()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_item_cursor_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_item_cursor_set_p);
- tcase_add_test(tcase, utc_elm_genlist_item_cursor_set_n);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *box = NULL, *genlist = NULL;
-static Elm_Genlist_Item_Class *gic = NULL;
-static Elm_Object_Item *item = NULL;
-static const char *cursor = "boat";
-static const char *ret = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_item_cursor_unset elm_genlist_item_cursor_unset()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- * @step 4 Add a genlist's item class in the genlist
- * @step 5 Append an item in the genlist
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- box = elm_box_add(main_win);
- if (box == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a box to the main window..", __FILE__, __LINE__);
- return;
- }
- elm_win_resize_object_add(main_win, box);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_box_pack_end(box, genlist);
- gic = elm_genlist_item_class_new();
- if (gic == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
- return;
- }
- item = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- if (item == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- evas_object_show(box);
- evas_object_show(genlist);
-}
-
-static void
-teardown(void)
-{
- elm_object_item_del(item);
- item = NULL;
-
- if (main_win != NULL)
- {
- evas_object_del (main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-static Eina_Bool _set_timer_cb_p(void* data)
-{
- elm_genlist_item_cursor_set(item, cursor);
- return ECORE_CALLBACK_CANCEL;
-}
-
-static Eina_Bool _get_and_quit_timer_cb_p(void *data)
-{
- ret = elm_genlist_item_cursor_get(item);
- ecore_main_loop_quit();
- return ECORE_CALLBACK_CANCEL;
-}
-
-static Eina_Bool _unset_timer_cb_p(void* data)
-{
- elm_genlist_item_cursor_unset(item);
- return ECORE_CALLBACK_CANCEL;
-}
-
-/**
- * @addtogroup elm_genlist_item_cursor_unset
- * @{
- * @objective Positive Test case 01: checks if function call with valid value to set
- * the style of a given genlist item to default works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist item object
- *
- * @procedure
- * @step 1 Call elm_genlist_item_cursor_style_set to set starting value
- * @step 2 Call elm_genlist_item_cursor_unset with valid values to set the style back to default
- * @step 3 Check if style was changed
- *
- * @passcondition
- * @li Test passes if the value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_cursor_unset_p_1)
-{
- if (main_win == NULL || genlist == NULL || gic == NULL || item == NULL)
- {
- return;
- }
-
-
- ecore_timer_add(2, _set_timer_cb_p, NULL);
- ecore_timer_add(4, _get_and_quit_timer_cb_p, NULL);
- ecore_main_loop_begin();
- if (ret == NULL || strcmp(ret, cursor))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- ecore_timer_add(2, _unset_timer_cb_p, NULL);
- ecore_timer_add(4, _get_and_quit_timer_cb_p, NULL);
- ecore_main_loop_begin();
-
- if (ret)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..%s", __FILE__, __LINE__, ret);
- return;
- }
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_genlist_item_cursor_unset
- * @{
- * @objective Negative Test case 01: checks if function call with invalid value to set
- * the cursor style of a given genlist item to defualt works properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the genlist item object
- *
- * @procedure
- * @step 1 Call elm_genlist_item_cursor_unset with invalid values
- *
- * @passcondition
- * @li Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_cursor_unset_n_1)
-{
-
- UNITEST_FUNC_NEG(elm_genlist_item_cursor_unset, item);
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed.\n", __FILE__, __LINE__);
-
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_genlist_item_cursor_unset()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_item_cursor_unset");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_item_cursor_unset_p_1);
- tcase_add_test(tcase, utc_elm_genlist_item_cursor_unset_n_1);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-
-Elm_Genlist_Item_Class* itc = NULL;
-Elm_Genlist_Item_Class* itc_no_decorate_style = NULL;
-static Evas_Object *main_win = NULL, *genlist = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_item_decorate_mode_get elm_genlist_item_decorate_mode_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- * @step 4 Add 2 genlist's item classes in the genlist
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window.", __FILE__, __LINE__);
- }
-
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window.", __FILE__, __LINE__);
- }
-
- itc = elm_genlist_item_class_new();
- if (itc == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist style class.", __FILE__, __LINE__);
- }
- itc->item_style = "default";
- itc->decorate_item_style = "mode";
- itc->func.text_get = NULL;
-
- itc_no_decorate_style = elm_genlist_item_class_new();
- if (itc_no_decorate_style == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist style class.", __FILE__, __LINE__);
- }
- itc_no_decorate_style->item_style = "default";
-
- evas_object_show(main_win);
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
-
- //object deletion
- elm_genlist_item_class_free(itc_no_decorate_style);
- itc_no_decorate_style = NULL;
-
- elm_genlist_item_class_free(itc);
- itc = NULL;
-
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_item_decorate_mode_get
- * @{
- * @objective Positive Test case checks whether decorate mode is set to genlist element
- * @n Input Data:
- * @li genlist item
- *
- * @procedure
- * @step 1 Call elm_genlist_item_append to add an item to genlist
- * @step 2 Call elm_genlist_item_decorate_mode_get to activate a genlist mode on an item
- * @step 3 Call elm_genlist_item_decorate_mode_get to get item's decorate mode
- * @step 4 Check whether set mode corresponds to actual genlist item decorate mode
- *
- * @passcondition
- * @li Test passes if set decorate mode is equal to actual genlist item decorate mode
- * @}
- */
-START_TEST(utc_elm_genlist_item_decorate_mode_get_p_1)
-{
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window.", __FILE__, __LINE__);
- }
-
- Elm_Object_Item* it = elm_genlist_item_append (genlist, itc, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- if (it == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.", __FILE__, __LINE__);
- }
- elm_genlist_item_decorate_mode_set (it, "slide", EINA_TRUE);
- char* ret = elm_genlist_item_decorate_mode_get(it);
-
- if (strncmp(ret, "slide", 5) != 0)
- {
- elm_object_item_del(it);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.", __FILE__, __LINE__);
- }
-
- elm_object_item_del(it);
- printf("[TEST_PASS]:: %s[%d] : Test has passed.\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_genlist_item_decorate_mode_get
- * @{
- * @objective Positive Test case checks whether decorate mode is get to genlist element
- * test fails when genglist item class attribute "decorate_item_style" isn't set to "mode"
- * @n Input Data:
- * @li genlist item
- *
- * @procedure
- * @step 1 Call elm_genlist_item_append to add an item to genlist
- * @step 2 Call elm_genlist_item_decorate_mode_get to activate a genlist mode on an item
- * @step 3 Call elm_genlist_item_decorate_mode_get to get item's decorate mode
- * @step 4 Check whether set mode corresponds to actual genlist item decorate mode
- *
- * @passcondition
- * @li Test passes if set decorate mode is equal to actual genlist item decorate mode
- * @}
- */
-START_TEST(utc_elm_genlist_item_decorate_mode_get_p_2)
-{
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window.", __FILE__, __LINE__);
- }
-
- elm_genlist_clear(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window.", __FILE__, __LINE__);
- }
-
- Elm_Object_Item* it = elm_genlist_item_append (genlist, itc_no_decorate_style, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- if (it == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.", __FILE__, __LINE__);
- }
- elm_genlist_item_decorate_mode_set (it, "slide", EINA_TRUE);
- char* ret = elm_genlist_item_decorate_mode_get(it);
-
- if (!ret || strncmp(ret, "slide", 5) != 0)
- {
- elm_object_item_del(it);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.", __FILE__, __LINE__);
- }
-
- elm_object_item_del(it);
- printf("[TEST_PASS]:: %s[%d] : Test has passed.\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_genlist_item_decorate_mode_get
- * @{
- * @objective Negative Test case checks if function call with invalid value works without segmentation fault
- * @n Input Data:
- * @li genlist item
- *
- * @procedure
- * @step 1 Call elm_genlist_item_decorate_mode_get with invalid value instead of the genlist item
- *
- * @passcondition
- * @li Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_decorate_mode_get_n_1)
-{
- Elm_Object_Item* it = NULL;
- if (TEST_FAIL == UNITEST_FUNC_NEG_RET(NULL, elm_genlist_item_decorate_mode_get, it))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.", __FILE__, __LINE__);
- }
- else
- {
- printf("[TEST_PASS]:: %s[%d] : Test has passed.\n", __FILE__, __LINE__);
- }
-}
-END_TEST
-/**
-*@}
-*/
-
-TCase * _utc_elm_genlist_item_decorate_mode_get()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_item_decorate_mode_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_item_decorate_mode_get_p_1);
- tcase_add_test(tcase, utc_elm_genlist_item_decorate_mode_get_p_2);
- tcase_add_test(tcase, utc_elm_genlist_item_decorate_mode_get_n_1);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+#include "../../utc_negative_unitest.h"
+
+Elm_Genlist_Item_Class* itc = NULL;
+Elm_Genlist_Item_Class* itc_no_decorate_style = NULL;
+static Evas_Object *main_win = NULL, *genlist = NULL;
+
+/**
+ * @addtogroup elm_genlist
+ * @{
+ * @defgroup elm_genlist_item_decorate_mode_get elm_genlist_item_decorate_mode_get()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show main window
+ * @step 3 Add a genlist to the main window
+ * @step 4 Add 2 genlist's item classes in the genlist
+ */
+
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window.", __FILE__, __LINE__);
+ }
+
+ genlist = elm_genlist_add(main_win);
+ if (genlist == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window.", __FILE__, __LINE__);
+ }
+
+ itc = elm_genlist_item_class_new();
+ if (itc == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist style class.", __FILE__, __LINE__);
+ }
+ itc->item_style = "default";
+ itc->decorate_item_style = "mode";
+ itc->func.text_get = NULL;
+
+ itc_no_decorate_style = elm_genlist_item_class_new();
+ if (itc_no_decorate_style == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist style class.", __FILE__, __LINE__);
+ }
+ itc_no_decorate_style->item_style = "default";
+
+ evas_object_show(main_win);
+}
+
+static void
+teardown(void)
+{
+ if (main_win != NULL)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+
+ //object deletion
+ elm_genlist_item_class_free(itc_no_decorate_style);
+ itc_no_decorate_style = NULL;
+
+ elm_genlist_item_class_free(itc);
+ itc = NULL;
+
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_genlist_item_decorate_mode_get
+ * @{
+ * @objective Positive Test case checks whether decorate mode is set to genlist element
+ * @n Input Data:
+ * @li genlist item
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_item_append to add an item to genlist
+ * @step 2 Call elm_genlist_item_decorate_mode_get to activate a genlist mode on an item
+ * @step 3 Call elm_genlist_item_decorate_mode_get to get item's decorate mode
+ * @step 4 Check whether set mode corresponds to actual genlist item decorate mode
+ *
+ * @passcondition
+ * @li Test passes if set decorate mode is equal to actual genlist item decorate mode
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_decorate_mode_get_p_1)
+{
+ Elm_Object_Item* it = elm_genlist_item_append (genlist, itc, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ if (it == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.", __FILE__, __LINE__);
+ }
+ elm_genlist_item_decorate_mode_set (it, "slide", EINA_TRUE);
+ char* ret = elm_genlist_item_decorate_mode_get(it);
+
+ if (strncmp(ret, "slide", 5) != 0)
+ {
+ elm_object_item_del(it);
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.", __FILE__, __LINE__);
+ }
+
+ elm_object_item_del(it);
+ printf("[TEST_PASS]:: %s[%d] : Test has passed.\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_genlist_item_decorate_mode_get
+ * @{
+ * @objective Positive Test case checks whether decorate mode is get to genlist element
+ * test fails when genglist item class attribute "decorate_item_style" isn't set to "mode"
+ * @n Input Data:
+ * @li genlist item
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_item_append to add an item to genlist
+ * @step 2 Call elm_genlist_item_decorate_mode_get to activate a genlist mode on an item
+ * @step 3 Call elm_genlist_item_decorate_mode_get to get item's decorate mode
+ * @step 4 Check whether set mode corresponds to actual genlist item decorate mode
+ *
+ * @passcondition
+ * @li Test passes if set decorate mode is equal to actual genlist item decorate mode
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_decorate_mode_get_p_2)
+{
+ elm_genlist_clear(main_win);
+ genlist = elm_genlist_add(main_win);
+ if (genlist == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window.", __FILE__, __LINE__);
+ }
+
+ Elm_Object_Item* it = elm_genlist_item_append (genlist, itc_no_decorate_style, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ if (it == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.", __FILE__, __LINE__);
+ }
+ elm_genlist_item_decorate_mode_set (it, "slide", EINA_TRUE);
+ char* ret = elm_genlist_item_decorate_mode_get(it);
+
+ if (!ret || strncmp(ret, "slide", 5) != 0)
+ {
+ elm_object_item_del(it);
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.", __FILE__, __LINE__);
+ }
+
+ elm_object_item_del(it);
+ printf("[TEST_PASS]:: %s[%d] : Test has passed.\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_genlist_item_decorate_mode_get
+ * @{
+ * @objective Negative Test case checks if function call with invalid value works without segmentation fault
+ * @n Input Data:
+ * @li genlist item
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_item_decorate_mode_get with invalid value instead of the genlist item
+ *
+ * @passcondition
+ * @li Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_decorate_mode_get_n)
+{
+ Elm_Object_Item* it = NULL;
+ if (TEST_FAIL == UNITEST_FUNC_NEG_RET(NULL, elm_genlist_item_decorate_mode_get, it))
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.", __FILE__, __LINE__);
+ }
+ else
+ {
+ printf("[TEST_PASS]:: %s[%d] : Test has passed.\n", __FILE__, __LINE__);
+ }
+}
+END_TEST
+
+/**
+ * @addtogroup elm_genlist_item_decorate_mode_set
+ * @{
+ * @objective Activate a genlist mode on NULL item
+ * @procedure
+ * @step 1 Call elm_genlist_item_decorate_mode_set with NULL
+ *
+ * @passcondition no crash
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_decorate_mode_set_n)
+{
+ elm_genlist_item_decorate_mode_set (NULL, "mode_type", EINA_FALSE);
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+*@}
+*/
+
+TCase * _utc_elm_genlist_item_decorate_mode_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_genlist_item_decorate_mode_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_genlist_item_decorate_mode_get_p_1);
+ tcase_add_test(tcase, utc_elm_genlist_item_decorate_mode_get_p_2);
+ tcase_add_test(tcase, utc_elm_genlist_item_decorate_mode_get_n);
+ tcase_add_test(tcase, utc_elm_genlist_item_decorate_mode_set_n);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-
-static Evas_Object *main_win;
-
-Elm_Genlist_Item_Class *itc;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_item_decorate_mode_set elm_genlist_item_decorate_mode_set()
- *
- * @precondition
- * @step 1 Create and show a main window
- */
-static void
-setup(void)
-{
- printf (" ============ Startup ============ \n");
- UTC_ELM_INIT();
- itc = elm_genlist_item_class_new();
- main_win = elm_win_add (NULL, "main", ELM_WIN_BASIC);
- evas_object_show (main_win);
-}
-
-static void
-teardown(void)
-{
- if (NULL != main_win)
- {
- evas_object_del (main_win);
- main_win = NULL;
- }
- elm_genlist_item_class_free(itc);
- elm_shutdown ();
- printf (" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_item_decorate_mode_set
- * @{
- * @objective Activate a genlist mode on an item
- * @procedure
- * @step 1 Add an item to the genlist
- * @step 2 Call elm_genlist_item_decorate_mode_set to set a mode
- *
- * @passcondition API executes successfully.
- * @}
- */
-START_TEST(utc_elm_genlist_item_decorate_mode_set_p)
-{
- Evas_Object *genlist = NULL;
- genlist = elm_genlist_add (main_win);
- Elm_Object_Item *it = NULL;
- char *ret = NULL;
- it = elm_genlist_item_append (genlist, itc, NULL, NULL,
- ELM_GENLIST_ITEM_NONE, NULL, NULL);
-
- elm_genlist_item_decorate_mode_set (it, "decorate_type", EINA_TRUE);
- ret = elm_genlist_item_decorate_mode_get(it);
-
- if (strcmp(ret, "decorate_type") != 0)
- {
- 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_genlist_item_decorate_mode_set
- * @{
- * @objective Activate a genlist mode on NULL item
- * @procedure
- * @step 1 Call elm_genlist_item_decorate_mode_set with NULL
- *
- * @passcondition no crash
- * @}
- */
-START_TEST(utc_elm_genlist_item_decorate_mode_set_n)
-{
- elm_genlist_item_decorate_mode_set (NULL, "mode_type", EINA_FALSE);
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-/**
- *@}
- */
-
-TCase * _utc_elm_genlist_item_decorate_mode_set()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_item_decorate_mode_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_item_decorate_mode_set_p);
- tcase_add_test(tcase, utc_elm_genlist_item_decorate_mode_set_n);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-static Elm_Genlist_Item_Class *gic = NULL;
-static Elm_Object_Item *item = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_item_expanded_get elm_genlist_item_expanded_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- * @step 4 Add a genlist's item class in the genlist
- * @step 5 Append an item in the genlist
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
- gic = elm_genlist_item_class_new();
- if (gic == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
- return;
- }
- item = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_TREE, NULL, NULL);
- if (item == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_item_expanded_get
- * @{
- * @objective Positive Test case checks if function call with valid value to get the expanded state
- * of an genlist item works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist item object
- *
- * @procedure
- * @step 1 Set the expanded state of the genlist item to EINA_TRUE
- * @step 2 Call elm_genlist_item_expanded_get with valid value
- * @step 3 Set the expanded state of the genlist item to EINA_FALSE
- * @step 4 Call elm_genlist_item_expanded_get with valid value
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_expanded_get_p)
-{
- if (main_win == NULL || genlist == NULL || gic == NULL || item == NULL)
- {
- return;
- }
-
- Eina_Bool ret = EINA_FALSE;
-
- elm_genlist_item_expanded_set(item, EINA_TRUE);
- ret = elm_genlist_item_expanded_get(item);
- if (ret == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- elm_genlist_item_expanded_set(item, EINA_FALSE);
- ret = elm_genlist_item_expanded_get(item);
- if (ret == 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_genlist_item_expanded_get
- * @{
- * @objective Negative Test case checks if function call with invalid value to get the expanded state
- * of an genlist item works properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the genlist item object
- *
- * @procedure
- * @step 1 Call elm_genlist_item_expanded_get with invalid value instead of the genlist item object
- *
- * @passcondition
- * @li Test passes if returned value is EINA_FALSE and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_expanded_get_n)
-{
- if (TEST_FAIL == UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_genlist_item_expanded_get, item))
- {
- 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_genlist_item_expanded_get()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_item_expanded_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_item_expanded_get_p);
- tcase_add_test(tcase, utc_elm_genlist_item_expanded_get_n);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+#include "../../utc_negative_unitest.h"
+static Evas_Object *main_win = NULL, *genlist = NULL;
+static Elm_Genlist_Item_Class *gic = NULL;
+static Elm_Object_Item *item = NULL;
+
+/**
+ * @addtogroup elm_genlist
+ * @{
+ * @defgroup elm_genlist_item_expanded_set elm_genlist_item_expanded_set()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show main window
+ * @step 3 Add a genlist to the main window
+ * @step 4 Add a genlist's item class in the genlist
+ * @step 5 Append an item in the genlist
+ */
+
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ }
+ evas_object_show(main_win);
+ genlist = elm_genlist_add(main_win);
+ if (genlist == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
+ }
+ gic = elm_genlist_item_class_new();
+ if (gic == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
+ }
+ item = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_TREE, NULL, NULL);
+ if (item == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
+ }
+}
+
+static void
+teardown(void)
+{
+ if (main_win != NULL)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_genlist_item_expanded_set
+ * @{
+ * @objective Positive Test case checks if function call with valid values to set the expanded state
+ * of an genlist item works properly and without segmentation fault
+ * @n Input Data:
+ * @li the genlist item object
+ * @li EINA_TRUE, EINA_FALSE as the expanded state (EINA_TRUE = expanded, EINA_FALSE = not expanded)
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_item_expanded_set with EINA_TRUE as the expanded state
+ * @step 2 Get the expanded state of the genlist item
+ * @step 3 Call elm_genlist_item_expanded_set with EINA_FALSE as the expanded state
+ * @step 4 Get the expanded state of the genlist item
+ *
+ * @passcondition
+ * @li Test passes if returned value is same as specified value and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_expanded_set_p)
+{
+ Eina_Bool ret = EINA_FALSE;
+
+ elm_genlist_item_expanded_set(item, EINA_TRUE);
+ ret = elm_genlist_item_expanded_get(item);
+ if (ret == EINA_FALSE)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ elm_genlist_item_expanded_set(item, EINA_FALSE);
+ ret = elm_genlist_item_expanded_get(item);
+ if (ret == 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_genlist_item_expanded_set
+ * @{
+ * @objective Negative Test case checks if function call with invalid values to set the expanded state
+ * of an genlist item works without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the genlist item object
+ * @li EINA_TRUE as the expanded state (EINA_TRUE expanded, EINA_FALSE not expanded)
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_item_expanded_set with invalid values instead of the genlist item object
+ *
+ * @passcondition
+ * @li Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_expanded_set_n)
+{
+ CREATE_CHECKED_ARGS_ARRAY(1, 0)
+ UNITEST_FUNC_NEG_CA(elm_genlist_item_expanded_set, item, EINA_TRUE)
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_genlist_item_expanded_get
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to get the expanded state
+ * of an genlist item works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the genlist item object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_item_expanded_get with invalid value instead of the genlist item object
+ *
+ * @passcondition
+ * @li Test passes if returned value is EINA_FALSE and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_expanded_get_n)
+{
+ if (TEST_FAIL == UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_genlist_item_expanded_get, item))
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_genlist_item_expanded_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_genlist_item_expanded_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_genlist_item_expanded_set_p);
+ tcase_add_test(tcase, utc_elm_genlist_item_expanded_set_n);
+ tcase_add_test(tcase, utc_elm_genlist_item_expanded_get_n);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-static Elm_Genlist_Item_Class *gic = NULL;
-static Elm_Object_Item *item = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_item_expanded_set elm_genlist_item_expanded_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- * @step 4 Add a genlist's item class in the genlist
- * @step 5 Append an item in the genlist
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
- gic = elm_genlist_item_class_new();
- if (gic == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
- return;
- }
- item = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_TREE, NULL, NULL);
- if (item == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_item_expanded_set
- * @{
- * @objective Positive Test case checks if function call with valid values to set the expanded state
- * of an genlist item works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist item object
- * @li EINA_TRUE, EINA_FALSE as the expanded state (EINA_TRUE = expanded, EINA_FALSE = not expanded)
- *
- * @procedure
- * @step 1 Call elm_genlist_item_expanded_set with EINA_TRUE as the expanded state
- * @step 2 Get the expanded state of the genlist item
- * @step 3 Call elm_genlist_item_expanded_set with EINA_FALSE as the expanded state
- * @step 4 Get the expanded state of the genlist item
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_expanded_set_p)
-{
- if (main_win == NULL || genlist == NULL || gic == NULL || item == NULL)
- {
- return;
- }
-
- Eina_Bool ret = EINA_FALSE;
-
- elm_genlist_item_expanded_set(item, EINA_TRUE);
- ret = elm_genlist_item_expanded_get(item);
- if (ret == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- elm_genlist_item_expanded_set(item, EINA_FALSE);
- ret = elm_genlist_item_expanded_get(item);
- if (ret == 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_genlist_item_expanded_set
- * @{
- * @objective Negative Test case checks if function call with invalid values to set the expanded state
- * of an genlist item works without segmentation fault
- * @n Input Data:
- * @li NULL instead of the genlist item object
- * @li EINA_TRUE as the expanded state (EINA_TRUE expanded, EINA_FALSE not expanded)
- *
- * @procedure
- * @step 1 Call elm_genlist_item_expanded_set with invalid values instead of the genlist item object
- *
- * @passcondition
- * @li Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_expanded_set_n)
-{
- CREATE_CHECKED_ARGS_ARRAY(1, 0)
- UNITEST_FUNC_NEG_CA(elm_genlist_item_expanded_set, item, EINA_TRUE)
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_genlist_item_expanded_set()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_item_expanded_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_item_expanded_set_p);
- tcase_add_test(tcase, utc_elm_genlist_item_expanded_set_n);
- return tcase;
-}
if (main_win == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
}
evas_object_resize(main_win, 300, 300);
box = elm_box_add(main_win);
if (box == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a box to the main window..", __FILE__, __LINE__);
- return;
}
elm_win_resize_object_add(main_win, box);
genlist = elm_genlist_add(main_win);
if (genlist == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
}
evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_box_pack_end(box, genlist);
if (gic == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
- return;
}
gic->item_style = "default";
gic->func.text_get = _genlist_text_get;
if (item == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
- return;
}
// get data from item style
*/
START_TEST(utc_elm_genlist_item_fields_update_p)
{
- if (main_win == NULL || box == NULL || genlist == NULL || gic == NULL || item == NULL)
- {
- return;
- }
-
- ecore_timer_add(2, _update_and_quit_timer_cb_p, NULL);
+ ecore_timer_add(0.2, _update_and_quit_timer_cb_p, NULL);
ecore_main_loop_begin();
if (((texts) && (is_text_cb_called == EINA_FALSE)) || ((contents) && (is_content_cb_called == 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__);
}
*/
START_TEST(utc_elm_genlist_item_fields_update_n)
{
- if (main_win == NULL || genlist == NULL || gic == NULL || item == NULL)
- {
- return;
- }
-
elm_genlist_item_fields_update(NULL, "parts", ELM_GENLIST_ITEM_FIELD_ALL);
elm_genlist_item_fields_update(item, NULL, ELM_GENLIST_ITEM_FIELD_ALL);
elm_genlist_item_fields_update(item, "parts", ELM_GENLIST_ITEM_FIELD_ALL - 1);
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-static Elm_Genlist_Item_Class *gic = NULL;
-static Elm_Object_Item *item = NULL;
-Eina_Bool set_flip_state = EINA_FALSE, get_flip_state = EINA_FALSE;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_item_flip_get elm_genlist_item_flip_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- * @step 4 Add a genlist's item class in the genlist
- * @step 5 Append an item in the genlist
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
- gic = elm_genlist_item_class_new();
- if (gic == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
- return;
- }
- item = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- if (item == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del (main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-static Eina_Bool _set_timer_cb(void *data)
-{
- elm_genlist_item_flip_set(item, set_flip_state);
- return ECORE_CALLBACK_CANCEL;
-}
-
-static Eina_Bool _get_timer_cb(void *data)
-{
- elm_genlist_item_update(item);
- get_flip_state = elm_genlist_item_flip_get(item);
- ecore_main_loop_quit();
- return ECORE_CALLBACK_CANCEL;
-}
-
-/**
- * @addtogroup elm_genlist_item_flip_get
- * @{
- * @objective Positive Test case checks if function call with valid value to get
- * the flip state of a given genlist item works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist item object
- *
- * @procedure
- * @step 1 Run event/processing loop for Elementary
- * @step 2 Set the flip state of the given genlist item to EINA_TRUE
- * @step 3 Call elm_genlist_item_flip_get with valid value after 2 seconds after flip state was changed
- * @step 4 Stop event/processing loop for Elementary
- * @step 5 Run event/processing loop for Elementary
- * @step 6 Set the flip state of the given genlist item to EINA_FALSE
- * @step 7 Call elm_genlist_item_flip_get with valid value after 2 seconds after flip state was changed
- * @step 8 Stop event/processing loop for Elementary
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_flip_get_p)
-{
- if (main_win == NULL || genlist == NULL || gic == NULL || item == NULL)
- {
- return;
- }
-
- set_flip_state = EINA_TRUE;
- ecore_timer_add(2.0, _set_timer_cb, NULL);
- ecore_timer_add(4.0, _get_timer_cb, NULL);
- ecore_main_loop_begin();
- if (set_flip_state != get_flip_state)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- set_flip_state = EINA_FALSE;
- ecore_timer_add(2.0, _set_timer_cb, NULL);
- ecore_timer_add(4.0, _get_timer_cb, NULL);
- ecore_main_loop_begin();
- if (set_flip_state != get_flip_state)
- {
- 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_genlist_item_flip_get
- * @{
- * @objective Negative Test case checks if function call with invalid value to get
- * the flip state of a given genlist item works properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the genlist item object
- *
- * @procedure
- * @step 1 Call elm_genlist_item_flip_get with invalid value instead of the genlist item object
- *
- * @passcondition
- * @li Test passes if returned value is EINA_FALSE and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_flip_get_n)
-{
- if (TEST_FAIL == UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_genlist_item_flip_get, item))
- {
- 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_genlist_item_flip_get()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_item_flip_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_item_flip_get_p);
- tcase_add_test(tcase, utc_elm_genlist_item_flip_get_n);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+#include "../../utc_negative_unitest.h"
+static Evas_Object *main_win = NULL, *genlist = NULL;
+static Elm_Genlist_Item_Class *gic = NULL;
+static Elm_Object_Item *item = NULL;
+Eina_Bool set_flip_state = EINA_FALSE, get_flip_state = EINA_FALSE;
+
+/**
+ * @addtogroup elm_genlist
+ * @{
+ * @defgroup elm_genlist_item_flip_set elm_genlist_item_flip_set()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show main window
+ * @step 3 Add a genlist to the main window
+ * @step 4 Add a genlist's item class in the genlist
+ * @step 5 Append an item in the genlist
+ */
+
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ }
+ evas_object_show(main_win);
+ genlist = elm_genlist_add(main_win);
+ if (genlist == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
+ }
+ gic = elm_genlist_item_class_new();
+ if (gic == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
+ }
+ item = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ if (item == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
+ }
+}
+
+static void
+teardown(void)
+{
+ if (main_win != NULL)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool _set_timer_cb(void *data)
+{
+ elm_genlist_item_flip_set(item, set_flip_state);
+ return ECORE_CALLBACK_CANCEL;
+}
+
+static Eina_Bool _get_timer_cb(void *data)
+{
+ elm_genlist_item_update(item);
+ get_flip_state = elm_genlist_item_flip_get(item);
+ ecore_main_loop_quit();
+ return ECORE_CALLBACK_CANCEL;
+}
+
+/**
+ * @addtogroup elm_genlist_item_flip_set
+ * @{
+ * @objective Positive Test case checks if function call with valid values to set
+ * the flip state of a given genlist item works properly and without segmentation fault
+ * @n Input Data:
+ * @li the genlist item object
+ * @li EINA_TRUE, EINA_FALSE as the flip mode state (EINA_TRUE = on, EINA_FALSE = off)
+ *
+ * @procedure
+ * @step 1 Run event/processing loop for Elementary
+ * @step 2 Call elm_genlist_item_flip_set with EINA_TRUE as the flip mode state
+ * @step 3 Get the flip state of a given genlist item after 2 seconds after flip state was changed
+ * @step 4 Stop event/processing loop for Elementary
+ * @step 5 Run event/processing loop for Elementary
+ * @step 6 Call elm_genlist_item_flip_set with EINA_FALSE as the flip mode state
+ * @step 7 Get the flip state of a given genlist item after 2 seconds after flip state was changed
+ * @step 8 Stop event/processing loop for Elementary
+ *
+ * @passcondition
+ * @li Test passes if returned value is same as specified value and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_flip_set_p)
+{
+ set_flip_state = EINA_TRUE;
+ ecore_timer_add(0.2, _set_timer_cb, NULL);
+ ecore_timer_add(0.4, _get_timer_cb, NULL);
+ ecore_main_loop_begin();
+ if (set_flip_state != get_flip_state)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ set_flip_state = EINA_FALSE;
+ ecore_timer_add(0.2, _set_timer_cb, NULL);
+ ecore_timer_add(0.4, _get_timer_cb, NULL);
+ ecore_main_loop_begin();
+ if (set_flip_state != get_flip_state)
+ {
+ 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_genlist_item_flip_set
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to set
+ * the flip state of a given genlist item works without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the genlist item object
+ * @li EINA_TRUE as the flip mode state (EINA_TRUE = on, EINA_FALSE = off)
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_item_flip_set with invalid value instead of the genlist item object
+ *
+ * @passcondition
+ * @li Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_flip_set_n)
+{
+ CREATE_CHECKED_ARGS_ARRAY(1, 0)
+ UNITEST_FUNC_NEG_CA(elm_genlist_item_flip_set, genlist, EINA_TRUE)
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_genlist_item_flip_get
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to get
+ * the flip state of a given genlist item works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the genlist item object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_item_flip_get with invalid value instead of the genlist item object
+ *
+ * @passcondition
+ * @li Test passes if returned value is EINA_FALSE and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_flip_get_n)
+{
+ if (TEST_FAIL == UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_genlist_item_flip_get, item))
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_genlist_item_flip_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_genlist_item_flip_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_genlist_item_flip_set_p);
+ tcase_add_test(tcase, utc_elm_genlist_item_flip_set_n);
+ tcase_add_test(tcase, utc_elm_genlist_item_flip_get_n);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-static Elm_Genlist_Item_Class *gic = NULL;
-static Elm_Object_Item *item = NULL;
-Eina_Bool set_flip_state = EINA_FALSE, get_flip_state = EINA_FALSE;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_item_flip_set elm_genlist_item_flip_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- * @step 4 Add a genlist's item class in the genlist
- * @step 5 Append an item in the genlist
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
- gic = elm_genlist_item_class_new();
- if (gic == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
- return;
- }
- item = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- if (item == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-static Eina_Bool _set_timer_cb(void *data)
-{
- elm_genlist_item_flip_set(item, set_flip_state);
- return ECORE_CALLBACK_CANCEL;
-}
-
-static Eina_Bool _get_timer_cb(void *data)
-{
- elm_genlist_item_update(item);
- get_flip_state = elm_genlist_item_flip_get(item);
- ecore_main_loop_quit();
- return ECORE_CALLBACK_CANCEL;
-}
-
-/**
- * @addtogroup elm_genlist_item_flip_set
- * @{
- * @objective Positive Test case checks if function call with valid values to set
- * the flip state of a given genlist item works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist item object
- * @li EINA_TRUE, EINA_FALSE as the flip mode state (EINA_TRUE = on, EINA_FALSE = off)
- *
- * @procedure
- * @step 1 Run event/processing loop for Elementary
- * @step 2 Call elm_genlist_item_flip_set with EINA_TRUE as the flip mode state
- * @step 3 Get the flip state of a given genlist item after 2 seconds after flip state was changed
- * @step 4 Stop event/processing loop for Elementary
- * @step 5 Run event/processing loop for Elementary
- * @step 6 Call elm_genlist_item_flip_set with EINA_FALSE as the flip mode state
- * @step 7 Get the flip state of a given genlist item after 2 seconds after flip state was changed
- * @step 8 Stop event/processing loop for Elementary
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_flip_set_p)
-{
- if (main_win == NULL || genlist == NULL || gic == NULL || item == NULL)
- {
- return;
- }
-
- set_flip_state = EINA_TRUE;
- ecore_timer_add(2.0, _set_timer_cb, NULL);
- ecore_timer_add(4.0, _get_timer_cb, NULL);
- ecore_main_loop_begin();
- if (set_flip_state != get_flip_state)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- set_flip_state = EINA_FALSE;
- ecore_timer_add(2.0, _set_timer_cb, NULL);
- ecore_timer_add(4.0, _get_timer_cb, NULL);
- ecore_main_loop_begin();
- if (set_flip_state != get_flip_state)
- {
- 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_genlist_item_flip_set
- * @{
- * @objective Negative Test case checks if function call with invalid value to set
- * the flip state of a given genlist item works without segmentation fault
- * @n Input Data:
- * @li NULL instead of the genlist item object
- * @li EINA_TRUE as the flip mode state (EINA_TRUE = on, EINA_FALSE = off)
- *
- * @procedure
- * @step 1 Call elm_genlist_item_flip_set with invalid value instead of the genlist item object
- *
- * @passcondition
- * @li Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_flip_set_n)
-{
- CREATE_CHECKED_ARGS_ARRAY(1, 0)
- UNITEST_FUNC_NEG_CA(elm_genlist_item_flip_set, genlist, EINA_TRUE)
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_genlist_item_flip_set()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_item_flip_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_item_flip_set_p);
- tcase_add_test(tcase, utc_elm_genlist_item_flip_set_n);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-static Elm_Genlist_Item_Class *gic = NULL;
-static Elm_Object_Item *item1 = NULL;
-
-static char* _item_label_get(void *data, Evas_Object *obj, const char *part)
-{
- char buf[256];
- snprintf(buf, sizeof(buf), "Item # %i\n", (int)(long)data);
- return strdup(buf);
-}
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_item_item_class_get elm_genlist_item_item_class_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- * @step 4 Add a genlist's item class in the genlist
- * @step 5 Append 1 item in the genlist
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- }
- gic = elm_genlist_item_class_new();
- if (gic == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
- }
- gic->item_style = "default";
- gic->func.text_get = _item_label_get;
- gic->func.state_get = NULL;
- gic->func.del = NULL;
- item1 = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- if (item1 == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append a 1st item in the genlist widget..", __FILE__, __LINE__);
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del (main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_item_item_class_get
- * @{
- * @objective Positive Test case 01: checks if function call with valid value to get
- * class of a given genlist's item works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist item object
- *
- * @procedure
- * @step 1 Call elm_genlist_item_item_class_get with valid value
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_item_class_get_p_1)
-{
- if (main_win == NULL || genlist == NULL || gic == NULL || item1 == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- }
-
- if (elm_genlist_item_item_class_get(item1) != gic)
- {
- 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_genlist_item_item_class_get
- * @{
- * @objective Negative Test case 01: checks if function call with invalid value to get
- * the class of a given genlist's item works properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the item1 item object
- *
- * @procedure
- * @step 1 Call elm_genlist_item_item_class_get with invalid value instead of the genlist object
- *
- * @passcondition
- * @li Test passes if returned value is NULL and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_item_class_get_n_1)
-{
- if (TEST_FAIL == UNITEST_FUNC_NEG_RET(NULL, elm_genlist_item_item_class_get, item1))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_genlist_item_item_class_get()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_item_item_class_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_item_item_class_get_p_1);
- tcase_add_test(tcase, utc_elm_genlist_item_item_class_get_n_1);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+#include "../../utc_negative_unitest.h"
+static Evas_Object *main_win = NULL, *genlist = NULL;
+static Elm_Genlist_Item_Class *gic1 = NULL, *gic2 = NULL;
+static Elm_Object_Item *item1 = NULL;
+
+static char* _item_label_get(void *data, Evas_Object *obj, const char *part)
+{
+ char buf[256];
+ snprintf(buf, sizeof(buf), "Item # %i\n", (int)(long)data);
+ return strdup(buf);
+}
+
+/**
+ * @addtogroup elm_genlist
+ * @{
+ * @defgroup elm_genlist_item_item_class_update elm_genlist_item_item_class_update()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show main window
+ * @step 3 Add a genlist to the main window
+ * @step 4 Add a genlist's item class in the genlist
+ * @step 5 Append 1 item in the genlist
+ */
+
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ }
+ evas_object_show(main_win);
+ genlist = elm_genlist_add(main_win);
+ if (genlist == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
+ }
+ gic1 = elm_genlist_item_class_new();
+ if (gic1 == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
+ }
+ item1 = elm_genlist_item_append(genlist, gic1, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ if (item1 == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append a 1st item in the genlist widget..", __FILE__, __LINE__);
+ }
+}
+
+static void
+teardown(void)
+{
+ if (main_win != NULL)
+ {
+ evas_object_del (main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_genlist_item_item_class_update
+ * @{
+ * @objective Positive Test case 01: checks if function call with valid value to update
+ * class of a given genlist's item works properly and without segmentation fault
+ * @n Input Data:
+ * @li the genlist item object
+ * @li new class
+ *
+ * @procedure
+ * @step 1 Create another Elm_Genlist_Item_Class object.
+ * @step 2 Call elm_genlist_item_item_class_update with created value
+ * @step 3 Call elm_genlist_item_item_class_get to make sure that update was successful.
+ *
+ * @passcondition
+ * @li Test passes if returned value of elm_genlist_item_item_class_get function is same as specified value and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_item_class_update_p_1)
+{
+ if (main_win == NULL || genlist == NULL || gic1 == NULL || item1 == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+
+ gic2 = elm_genlist_item_class_new();
+ if (gic2 == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
+ }
+
+ gic2->item_style = "default";
+ gic2->func.text_get = _item_label_get;
+ gic2->func.state_get = NULL;
+ gic2->func.del = NULL;
+
+ elm_genlist_item_item_class_update(item1, gic2);
+ if (elm_genlist_item_item_class_get(item1) != gic2)
+ {
+ 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_genlist_item_item_class_update
+ * @{
+ * @objective Negative Test case 01: checks if function call with invalid value to update
+ * the class of a given genlist's item works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the genlist item object
+ * @li NULL instead of the new genlist item class object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_item_item_class_update with invalid value instead of one of the arguments
+ * @step 2 Call elm_genlist_item_item_class_get to make sure that the class did not change
+ *
+ * @passcondition
+ * @li Test passes if returned value is NULL and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_item_class_update_n_1)
+{
+ Elm_Object_Item *item2 = NULL;
+ UNITEST_FUNC_NEG(elm_genlist_item_item_class_update, item2, gic2);
+
+ if (elm_genlist_item_item_class_get(item2) != NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_genlist_item_item_class_get
+ * @{
+ * @objective Negative Test case 01: checks if function call with invalid value to get
+ * the class of a given genlist's item works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the item1 item object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_item_item_class_get with invalid value instead of the genlist object
+ *
+ * @passcondition
+ * @li Test passes if returned value is NULL and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_item_class_get_n_1)
+{
+ if (TEST_FAIL == UNITEST_FUNC_NEG_RET(NULL, elm_genlist_item_item_class_get, item1))
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_genlist_item_item_class_get_update()
+{
+ TCase *tcase = tcase_create("utc_elm_genlist_item_item_class_get_update");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_genlist_item_item_class_update_p_1);
+ tcase_add_test(tcase, utc_elm_genlist_item_item_class_update_n_1);
+ tcase_add_test(tcase, utc_elm_genlist_item_item_class_get_n_1);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-static Elm_Genlist_Item_Class *gic1 = NULL, *gic2 = NULL;
-static Elm_Object_Item *item1 = NULL;
-
-static char* _item_label_get(void *data, Evas_Object *obj, const char *part)
-{
- char buf[256];
- snprintf(buf, sizeof(buf), "Item # %i\n", (int)(long)data);
- return strdup(buf);
-}
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_item_item_class_update elm_genlist_item_item_class_update()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- * @step 4 Add a genlist's item class in the genlist
- * @step 5 Append 1 item in the genlist
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- }
- gic1 = elm_genlist_item_class_new();
- if (gic1 == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
- }
- item1 = elm_genlist_item_append(genlist, gic1, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- if (item1 == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append a 1st item in the genlist widget..", __FILE__, __LINE__);
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del (main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_item_item_class_update
- * @{
- * @objective Positive Test case 01: checks if function call with valid value to update
- * class of a given genlist's item works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist item object
- * @li new class
- *
- * @procedure
- * @step 1 Create another Elm_Genlist_Item_Class object.
- * @step 2 Call elm_genlist_item_item_class_update with created value
- * @step 3 Call elm_genlist_item_item_class_get to make sure that update was successful.
- *
- * @passcondition
- * @li Test passes if returned value of elm_genlist_item_item_class_get function is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_item_class_update_p_1)
-{
- if (main_win == NULL || genlist == NULL || gic1 == NULL || item1 == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- }
-
-
- gic2 = elm_genlist_item_class_new();
- if (gic2 == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
- }
-
- gic2->item_style = "default";
- gic2->func.text_get = _item_label_get;
- gic2->func.state_get = NULL;
- gic2->func.del = NULL;
-
- elm_genlist_item_item_class_update(item1, gic2);
- if (elm_genlist_item_item_class_get(item1) != gic2)
- {
- 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_genlist_item_item_class_update
- * @{
- * @objective Negative Test case 01: checks if function call with invalid value to update
- * the class of a given genlist's item works properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the genlist item object
- * @li NULL instead of the new genlist item class object
- *
- * @procedure
- * @step 1 Call elm_genlist_item_item_class_update with invalid value instead of one of the arguments
- * @step 2 Call elm_genlist_item_item_class_get to make sure that the class did not change
- *
- * @passcondition
- * @li Test passes if returned value is NULL and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_item_class_update_n_1)
-{
- Elm_Object_Item *item2 = NULL;
- UNITEST_FUNC_NEG(elm_genlist_item_item_class_update, item2, gic2);
-
- if (elm_genlist_item_item_class_get(item2) != NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_genlist_item_item_class_update()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_item_item_class_update");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_item_item_class_update_p_1);
- tcase_add_test(tcase, utc_elm_genlist_item_item_class_update_n_1);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-static Elm_Genlist_Item_Class *gic = NULL;
-static Elm_Object_Item *item = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_item_select_mode_get elm_genlist_item_select_mode_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- * @step 4 Add a genlist's item class in the genlist
- * @step 5 Append an item in the genlist
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
- gic = elm_genlist_item_class_new();
- if (gic == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
- return;
- }
- item = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- if (item == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_item_select_mode_get
- * @{
- * @objective Positive Test case checks if function call with valid value to get the genlist
- * item's select mode works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist item object
- *
- * @procedure
- * @step 1 Set the genlist item's select mode
- * @step 2 Call elm_genlist_item_select_mode_get with valid value
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_select_mode_get_p)
-{
- if (main_win == NULL || genlist == NULL || gic == NULL || item == NULL)
- {
- return;
- }
-
- Elm_Object_Select_Mode ret = ELM_OBJECT_SELECT_MODE_DEFAULT;
-
- elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
- ret = elm_genlist_item_select_mode_get(item);
- if (ret != ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY )
- {
- 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_genlist_item_select_mode_get
- * @{
- * @objective Negative Test case checks if function call with invalid value to get the genlist
- * item's select mode works properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the genlist item object
- *
- * @procedure
- * @step 1 Call elm_genlist_item_select_mode_get with invalid value instead of the genlist item object
- *
- * @passcondition
- * @li Test passes if returned value is ELM_OBJECT_SELECT_MODE_MAX and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_select_mode_get_n)
-{
- if (TEST_FAIL == UNITEST_FUNC_NEG_RET(ELM_OBJECT_SELECT_MODE_MAX, elm_genlist_item_select_mode_get, item))
- {
- 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_genlist_item_select_mode_get()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_item_select_mode_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_item_select_mode_get_p);
- tcase_add_test(tcase, utc_elm_genlist_item_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 Evas_Object *main_win = NULL, *genlist = NULL;
+static Elm_Genlist_Item_Class *gic = NULL;
+static Elm_Object_Item *item = NULL;
+
+/**
+ * @addtogroup elm_genlist
+ * @{
+ * @defgroup elm_genlist_item_select_mode_get elm_genlist_item_select_mode_get()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show main window
+ * @step 3 Add a genlist to the main window
+ * @step 4 Add a genlist's item class in the genlist
+ * @step 5 Append an item in the genlist
+ */
+
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ }
+ evas_object_show(main_win);
+ genlist = elm_genlist_add(main_win);
+ if (genlist == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
+ }
+ gic = elm_genlist_item_class_new();
+ if (gic == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
+ }
+ item = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ if (item == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
+ }
+}
+
+static void
+teardown(void)
+{
+ if (main_win != NULL)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_genlist_item_select_mode_get
+ * @{
+ * @objective Positive Test case checks if function call with valid value to get the genlist
+ * item's select mode works properly and without segmentation fault
+ * @n Input Data:
+ * @li the genlist item object
+ *
+ * @procedure
+ * @step 1 Set the genlist item's select mode
+ * @step 2 Call elm_genlist_item_select_mode_get with valid value
+ *
+ * @passcondition
+ * @li Test passes if returned value is same as specified value and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_select_mode_get_p)
+{
+ Elm_Object_Select_Mode ret = ELM_OBJECT_SELECT_MODE_DEFAULT;
+
+ elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ ret = elm_genlist_item_select_mode_get(item);
+ if (ret != ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY )
+ {
+ 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_genlist_item_select_mode_get
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to get the genlist
+ * item's select mode works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the genlist item object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_item_select_mode_get with invalid value instead of the genlist item object
+ *
+ * @passcondition
+ * @li Test passes if returned value is ELM_OBJECT_SELECT_MODE_MAX and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_select_mode_get_n)
+{
+ if (TEST_FAIL == UNITEST_FUNC_NEG_RET(ELM_OBJECT_SELECT_MODE_MAX, elm_genlist_item_select_mode_get, item))
+ {
+ 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_genlist_item_select_mode_set
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to set the genlist
+ * item's select mode works without segmentation fault
+ * @n Input Data:
+ * @li NULL, the genlist item object
+ * @li ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY, ELM_OBJECT_SELECT_MODE_DEFAULT - 1 as the select mode
+ * Note! ELM_OBJECT_SELECT_MODE_DEFAULT is the min value of Elm_Object_Select_Mode enum type
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_item_select_mode_set with invalid value instead of the genlist item object
+ * @step 2 Call elm_genlist_item_select_mode_set with invalid value instead of the select mode
+ *
+ * @passcondition
+ * @li Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_select_mode_set_n)
+{
+ elm_genlist_item_select_mode_set(NULL, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DEFAULT - 1);
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_genlist_item_select_mode_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_genlist_item_select_mode_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_genlist_item_select_mode_get_p);
+ tcase_add_test(tcase, utc_elm_genlist_item_select_mode_get_n);
+ tcase_add_test(tcase, utc_elm_genlist_item_select_mode_set_n);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-static Elm_Genlist_Item_Class *gic = NULL;
-static Elm_Object_Item *item = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_item_select_mode_set elm_genlist_item_select_mode_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- * @step 4 Add a genlist's item class in the genlist
- * @step 5 Append an item in the genlist
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
- gic = elm_genlist_item_class_new();
- if (gic == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
- return;
- }
- item = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- if (item == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_item_select_mode_set
- * @{
- * @objective Positive Test case checks if function call with valid values to set the genlist
- * item's select mode works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist item object
- * @li ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY as the select mode
- *
- * @procedure
- * @step 1 Call elm_genlist_item_select_mode_set with valid values
- * @step 2 Get the genlist item's select mode
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_select_mode_set_p)
-{
- if (main_win == NULL || genlist == NULL || gic == NULL || item == NULL)
- {
- return;
- }
-
- Elm_Object_Select_Mode ret = ELM_OBJECT_SELECT_MODE_DEFAULT;
-
- elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
- ret = elm_genlist_item_select_mode_get(item);
- if (ret != ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY)
- {
- 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_genlist_item_select_mode_set
- * @{
- * @objective Negative Test case checks if function call with invalid value to set the genlist
- * item's select mode works without segmentation fault
- * @n Input Data:
- * @li NULL, the genlist item object
- * @li ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY, ELM_OBJECT_SELECT_MODE_DEFAULT - 1 as the select mode
- * Note! ELM_OBJECT_SELECT_MODE_DEFAULT is the min value of Elm_Object_Select_Mode enum type
- *
- * @procedure
- * @step 1 Call elm_genlist_item_select_mode_set with invalid value instead of the genlist item object
- * @step 2 Call elm_genlist_item_select_mode_set with invalid value instead of the select mode
- *
- * @passcondition
- * @li Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_select_mode_set_n)
-{
- if (main_win == NULL || genlist == NULL || gic == NULL || item == NULL)
- {
- return;
- }
-
- elm_genlist_item_select_mode_set(NULL, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
- elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DEFAULT - 1);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_genlist_item_select_mode_set()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_item_select_mode_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_item_select_mode_set_p);
- tcase_add_test(tcase, utc_elm_genlist_item_select_mode_set_n);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-static Elm_Genlist_Item_Class *gic = NULL;
-static Elm_Object_Item *item1 = NULL, *item2 = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_item_selected_get elm_genlist_item_selected_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- * @step 4 Add a genlist's item class in the genlist
- * @step 5 Append 2 items in the genlist
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
- gic = elm_genlist_item_class_new();
- if (gic == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
- return;
- }
- item1 = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- if (item1 == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append a 1st item in the genlist widget..", __FILE__, __LINE__);
- return;
- }
- item2 = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- if (item2 == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append a 2nd item in the genlist widget..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del (main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_item_selected_get
- * @{
- * @objective Positive Test case 01: checks if function call with valid value to find out
- * whether a given genlist item is selected or not works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist item object
- *
- * @procedure
- * @step 1 Call elm_genlist_item_selected_set for second item
- * @step 2 Call elm_genlist_item_selected_get for first item, result must be EINA_FALSE
- * @step 3 Call elm_genlist_item_selected_get for second item, result must be EINA_TRUE
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_selected_get_p_1)
-{
- if (main_win == NULL || genlist == NULL || gic == NULL || item1 == NULL || item2 == NULL)
- {
- return;
- }
-
- elm_genlist_item_selected_set(item2, EINA_TRUE);
- if ((elm_genlist_item_selected_get(item1) != EINA_FALSE) ||
- (elm_genlist_item_selected_get(item2) != 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_genlist_item_selected_get
- * @{
- * @objective Negative Test case 01: checks if function call with invalid value to find out whether
- * a given genlist item is selected or not works properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the genlist item object
- *
- * @procedure
- * @step 1 Call elm_genlist_item_selected_get with invalid value instead of the genlist item object
- *
- * @passcondition
- * @li Test passes if returned value is EINA_FALSE and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_selected_get_n_1)
-{
- if (TEST_FAIL == UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_genlist_item_selected_get, item1))
- {
- 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_genlist_item_selected_get()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_item_selected_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_item_selected_get_p_1);
- tcase_add_test(tcase, utc_elm_genlist_item_selected_get_n_1);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+#include "../../utc_negative_unitest.h"
+static Evas_Object *main_win = NULL, *genlist = NULL;
+static Elm_Genlist_Item_Class *gic = NULL;
+static Elm_Object_Item *item1 = NULL, *item2 = NULL;
+
+/**
+ * @addtogroup elm_genlist
+ * @{
+ * @defgroup elm_genlist_item_selected_set elm_genlist_item_selected_set()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show main window
+ * @step 3 Add a genlist to the main window
+ * @step 4 Add a genlist's item class in the genlist
+ * @step 5 Append 2 items in the genlist
+ */
+
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ }
+ evas_object_show(main_win);
+ genlist = elm_genlist_add(main_win);
+ if (genlist == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
+ }
+ gic = elm_genlist_item_class_new();
+ if (gic == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
+ }
+ item1 = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ if (item1 == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append a 1st item in the genlist widget..", __FILE__, __LINE__);
+ }
+ item2 = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ if (item2 == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append a 2nd item in the genlist widget..", __FILE__, __LINE__);
+ }
+}
+
+static void
+teardown(void)
+{
+ if (main_win != NULL)
+ {
+ evas_object_del (main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_genlist_item_selected_set
+ * @{
+ * @objective Positive Test case 01: checks if function call with valid value to set
+ * whether a given genlist item is selected or not works properly and without segmentation fault
+ * @n Input Data:
+ * @li the genlist item object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_item_selected_set for first item
+ * @step 2 Call elm_genlist_item_selected_get for first item, result must be EINA_TRUE
+ * @step 3 Call elm_genlist_item_selected_get for second item, result must be EINA_FALSE
+ *
+ * @passcondition
+ * @li Test passes if returned value is same as specified value and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_selected_set_p_1)
+{
+ elm_genlist_item_selected_set(item1, EINA_TRUE);
+ elm_genlist_item_selected_set(item2, EINA_FALSE);
+ if ((elm_genlist_item_selected_get(item1) != EINA_TRUE) ||
+ (elm_genlist_item_selected_get(item2) != 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_genlist_item_selected_get
+ * @{
+ * @objective Negative Test case 01: checks if function call with invalid value to find out whether
+ * a given genlist item is selected or not works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the genlist item object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_item_selected_get with invalid value instead of the genlist item object
+ *
+ * @passcondition
+ * @li Test passes if returned value is EINA_FALSE and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_selected_get_n_1)
+{
+ if (TEST_FAIL == UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_genlist_item_selected_get, item1))
+ {
+ 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_genlist_item_selected_set
+ * @{
+ * @objective Negative Test case 01: checks if function call with invalid value to set whether
+ * a given genlist item is selected or not works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the genlist item object
+ *
+ * @procedure
+ * @step 1 Unselect all items
+ * @step 2 Call elm_genlist_item_selected_set with invalid value instead of the genlist item object
+ * @step 3 Check first and second items whether any of them is selected.
+ *
+ * @passcondition
+ * @li Test passes if returned value is EINA_FALSE and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_selected_set_n_1)
+{
+ elm_genlist_item_selected_set(item1, EINA_FALSE);
+ elm_genlist_item_selected_set(item2, EINA_FALSE);
+ elm_genlist_item_selected_set(NULL, EINA_TRUE);
+ if ((elm_genlist_item_selected_get(item1) != EINA_FALSE) ||
+ (elm_genlist_item_selected_get(item2) != 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
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_genlist_item_selected_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_genlist_item_selected_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_genlist_item_selected_set_p_1);
+ tcase_add_test(tcase, utc_elm_genlist_item_selected_get_n_1);
+ tcase_add_test(tcase, utc_elm_genlist_item_selected_set_n_1);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-static Elm_Genlist_Item_Class *gic = NULL;
-static Elm_Object_Item *item1 = NULL, *item2 = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_item_selected_set elm_genlist_item_selected_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- * @step 4 Add a genlist's item class in the genlist
- * @step 5 Append 2 items in the genlist
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
- gic = elm_genlist_item_class_new();
- if (gic == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
- return;
- }
- item1 = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- if (item1 == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append a 1st item in the genlist widget..", __FILE__, __LINE__);
- return;
- }
- item2 = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- if (item2 == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append a 2nd item in the genlist widget..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del (main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_item_selected_set
- * @{
- * @objective Positive Test case 01: checks if function call with valid value to set
- * whether a given genlist item is selected or not works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist item object
- *
- * @procedure
- * @step 1 Call elm_genlist_item_selected_set for first item
- * @step 2 Call elm_genlist_item_selected_get for first item, result must be EINA_TRUE
- * @step 3 Call elm_genlist_item_selected_get for second item, result must be EINA_FALSE
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_selected_set_p_1)
-{
- if (main_win == NULL || genlist == NULL || gic == NULL || item1 == NULL || item2 == NULL)
- {
- return;
- }
-
- elm_genlist_item_selected_set(item1, EINA_TRUE);
- elm_genlist_item_selected_set(item2, EINA_FALSE);
- if ((elm_genlist_item_selected_get(item1) != EINA_TRUE) ||
- (elm_genlist_item_selected_get(item2) != 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_genlist_item_selected_set
- * @{
- * @objective Negative Test case 01: checks if function call with invalid value to set whether
- * a given genlist item is selected or not works properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the genlist item object
- *
- * @procedure
- * @step 1 Unselect all items
- * @step 2 Call elm_genlist_item_selected_set with invalid value instead of the genlist item object
- * @step 3 Check first and second items whether any of them is selected.
- *
- * @passcondition
- * @li Test passes if returned value is EINA_FALSE and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_selected_set_n_1)
-{
- elm_genlist_item_selected_set(item1, EINA_FALSE);
- elm_genlist_item_selected_set(item2, EINA_FALSE);
- elm_genlist_item_selected_set(NULL, EINA_TRUE);
- if ((elm_genlist_item_selected_get(item1) != EINA_FALSE) ||
- (elm_genlist_item_selected_get(item2) != 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
-
-/**
- *@}
- */
-
-TCase * _utc_elm_genlist_item_selected_set()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_item_selected_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_item_selected_set_p_1);
- tcase_add_test(tcase, utc_elm_genlist_item_selected_set_n_1);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *box = NULL, *genlist = NULL;
-static Elm_Genlist_Item_Class *gic = NULL;
-static Elm_Object_Item *item1 = NULL, *item2 = NULL;
-static Eina_Bool result1 = EINA_FALSE, result2 = EINA_TRUE;
-static Eina_Bool gotWinMode1 = EINA_FALSE, gotWinMode2 = EINA_TRUE;
-
-static const char* strTooltip1 = "I go to school every day.";
-static const char* strTooltip2 = "I am a doctor!";
-
-static Eina_Bool _tooltip_text_set_timer_cb(void* data)
-{
- elm_genlist_item_tooltip_text_set(item1, strTooltip1);
- elm_genlist_item_tooltip_text_set(item2, strTooltip2);
-
- return ECORE_CALLBACK_CANCEL;
-}
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_item_tooltip_window_mode_get elm_genlist_item_tooltip_window_mode_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create a main window
- * @step 3 Add a box to the main window
- * @step 4 Set a box as a resize object of the main window
- * @step 5 Add a genlist to the main window and set up it
- * @step 6 Add the genlist at the end of the box's pack list
- * @step 7 Add a genlist's item class in the genlist
- * @step 8 Append two items in the genlist
- * @step 9 Show main window and genlist
- * @step10 Set text to genlist item's tooltips
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- box = elm_box_add(main_win);
- if (box == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a box to the main window..", __FILE__, __LINE__);
- return;
- }
- elm_win_resize_object_add(main_win, box);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_box_pack_end(box, genlist);
- gic = elm_genlist_item_class_new();
- if (gic == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
- return;
- }
- item1 = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- if (item1 == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
- return;
- }
-
- item2 = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- if (item2 == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
- return;
- }
- ecore_timer_add(1, _tooltip_text_set_timer_cb, NULL);
-
- evas_object_show(main_win);
- evas_object_show(box);
- evas_object_show(genlist);
-}
-
-static void
-teardown(void)
-{
- elm_object_item_del(item1);
- elm_object_item_del(item2);
- item1 = NULL;
- item2 = NULL;
-
- if (main_win != NULL)
- {
- evas_object_del (main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-static Eina_Bool _set_timer_cb_p(void* data)
-{
- result1 = elm_genlist_item_tooltip_window_mode_set(item1, EINA_TRUE);
- result2 = elm_genlist_item_tooltip_window_mode_set(item2, EINA_FALSE);
-
- return ECORE_CALLBACK_CANCEL;
-}
-
-static Eina_Bool _get_and_quit_timer_cb_p(void *data)
-{
- gotWinMode1 = elm_genlist_item_tooltip_window_mode_get(item1);
- gotWinMode2 = elm_genlist_item_tooltip_window_mode_get(item2);
-
- ecore_main_loop_quit();
- return ECORE_CALLBACK_CANCEL;
-}
-
-/**
- * @addtogroup elm_genlist_item_tooltip_window_mode_get
- * @{
- * @objective Positive Test case 01: checks if function call with valid value to get
- * tooltip window mode of a given genlist item works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist item object
- *
- * @procedure
- * @step 1 Call elm_genlist_item_tooltip_window_mode_set to set starting value
- * @step 2 Call elm_genlist_item_tooltip_window_mode_get with valid value
- * @step 3 Compare two values
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_tooltip_window_mode_get_p_1)
-{
- if (main_win == NULL || genlist == NULL || gic == NULL || item1 == NULL || item2 == NULL)
- {
- return;
- }
-
-
- gotWinMode1 = elm_genlist_item_tooltip_window_mode_get(item1);
- gotWinMode2 = elm_genlist_item_tooltip_window_mode_get(item2);
-
- if (gotWinMode1 != EINA_FALSE || gotWinMode2 != EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed. Get initial uncorrect value.", __FILE__, __LINE__);
- return;
- }
-
- ecore_timer_add(2, _set_timer_cb_p, NULL);
- ecore_timer_add(4, _get_and_quit_timer_cb_p, NULL);
- ecore_main_loop_begin();
-
- if (result1 != EINA_TRUE || result2 != EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed. Cannot set a value.%i_%i", __FILE__, __LINE__, result1, result2);
- return;
- }
-
- if (gotWinMode1 != EINA_TRUE || gotWinMode2 != EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed. Cannot get correct value.%i_%i", __FILE__, __LINE__, gotWinMode1, gotWinMode2);
- return;
- }
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed.\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_genlist_item_tooltip_window_mode_get
- * @{
- * @objective Negative Test case 01: checks if function call with invalid value to get
- * the tooltip window mode of a given genlist item works properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the genlist item object
- *
- * @procedure
- * @step 1 Call elm_genlist_item_tooltip_window_mode_get with invalid value instead of the genlist item object
- *
- * @passcondition
- * @li Test passes if returned value is EINA_FALSE and there is no segmentation fault
- * @}
- */
-#ifdef NOT_APPROVED_FOR_BUILD
-START_TEST(utc_elm_genlist_item_tooltip_window_mode_get_n_1)
-{
- if (TEST_FAIL == UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_genlist_item_tooltip_window_mode_get, item1))
- {
- 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_genlist_item_tooltip_window_mode_get()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_item_tooltip_window_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_genlist_item_tooltip_window_mode_get_p_1);
-#ifdef NOT_APPROVED_FOR_BUILD
- tcase_add_test(tcase, utc_elm_genlist_item_tooltip_window_mode_get_n_1);
-#endif
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+#include "../../utc_negative_unitest.h"
+static Evas_Object *main_win = NULL, *box = NULL, *genlist = NULL;
+static Elm_Genlist_Item_Class *gic = NULL;
+static Elm_Object_Item *item1 = NULL, *item2 = NULL;
+static Eina_Bool result1 = EINA_FALSE, result2 = EINA_TRUE;
+static Eina_Bool gotWinMode1 = EINA_FALSE, gotWinMode2 = EINA_TRUE;
+
+static const char* strTooltip1 = "I go to school every day.";
+static const char* strTooltip2 = "I am a doctor!";
+
+static Eina_Bool _tooltip_text_set_timer_cb(void* data)
+{
+ elm_genlist_item_tooltip_text_set(item1, strTooltip1);
+ elm_genlist_item_tooltip_text_set(item2, strTooltip2);
+
+ return ECORE_CALLBACK_CANCEL;
+}
+
+/**
+ * @addtogroup elm_genlist
+ * @{
+ * @defgroup elm_genlist_item_tooltip_window_mode_get elm_genlist_item_tooltip_window_mode_get()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create a main window
+ * @step 3 Add a box to the main window
+ * @step 4 Set a box as a resize object of the main window
+ * @step 5 Add a genlist to the main window and set up it
+ * @step 6 Add the genlist at the end of the box's pack list
+ * @step 7 Add a genlist's item class in the genlist
+ * @step 8 Append two items in the genlist
+ * @step 9 Show main window and genlist
+ * @step10 Set text to genlist item's tooltips
+ */
+
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ }
+ box = elm_box_add(main_win);
+ if (box == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a box to the main window..", __FILE__, __LINE__);
+ }
+ elm_win_resize_object_add(main_win, box);
+ genlist = elm_genlist_add(main_win);
+ if (genlist == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
+ }
+ evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_box_pack_end(box, genlist);
+ gic = elm_genlist_item_class_new();
+ if (gic == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
+ }
+ item1 = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ if (item1 == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
+ }
+
+ item2 = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ if (item2 == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
+ }
+ ecore_timer_add(0.1, _tooltip_text_set_timer_cb, NULL);
+
+ evas_object_show(main_win);
+ evas_object_show(box);
+ evas_object_show(genlist);
+}
+
+static void
+teardown(void)
+{
+ elm_object_item_del(item1);
+ elm_object_item_del(item2);
+ item1 = NULL;
+ item2 = NULL;
+
+ if (main_win != NULL)
+ {
+ evas_object_del (main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool _set_timer_cb_p(void* data)
+{
+ result1 = elm_genlist_item_tooltip_window_mode_set(item1, EINA_TRUE);
+ result2 = elm_genlist_item_tooltip_window_mode_set(item2, EINA_FALSE);
+
+ return ECORE_CALLBACK_CANCEL;
+}
+
+static Eina_Bool _set_timer_cb_n(void* data)
+{
+
+ result1 = elm_genlist_item_tooltip_window_mode_set(NULL, EINA_TRUE);
+ ecore_main_loop_quit();
+ return ECORE_CALLBACK_CANCEL;
+}
+
+static Eina_Bool _get_and_quit_timer_cb_p(void *data)
+{
+ gotWinMode1 = elm_genlist_item_tooltip_window_mode_get(item1);
+ gotWinMode2 = elm_genlist_item_tooltip_window_mode_get(item2);
+
+ ecore_main_loop_quit();
+ return ECORE_CALLBACK_CANCEL;
+}
+
+/**
+ * @addtogroup elm_genlist_item_tooltip_window_mode_get
+ * @{
+ * @objective Positive Test case 01: checks if function call with valid value to get
+ * tooltip window mode of a given genlist item works properly and without segmentation fault
+ * @n Input Data:
+ * @li the genlist item object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_item_tooltip_window_mode_set to set starting value
+ * @step 2 Call elm_genlist_item_tooltip_window_mode_get with valid value
+ * @step 3 Compare two values
+ *
+ * @passcondition
+ * @li Test passes if returned value is same as specified value and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_tooltip_window_mode_get_p_1)
+{
+ gotWinMode1 = elm_genlist_item_tooltip_window_mode_get(item1);
+ gotWinMode2 = elm_genlist_item_tooltip_window_mode_get(item2);
+
+ if (gotWinMode1 != EINA_FALSE || gotWinMode2 != EINA_FALSE)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed. Get initial uncorrect value.", __FILE__, __LINE__);
+ return;
+ }
+
+ ecore_timer_add(0.2, _set_timer_cb_p, NULL);
+ ecore_timer_add(0.4, _get_and_quit_timer_cb_p, NULL);
+ ecore_main_loop_begin();
+
+ if (result1 != EINA_TRUE || result2 != EINA_FALSE)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed. Cannot set a value.%i_%i", __FILE__, __LINE__, result1, result2);
+ }
+
+ if (gotWinMode1 != EINA_TRUE || gotWinMode2 != EINA_FALSE)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed. Cannot get correct value.%i_%i", __FILE__, __LINE__, gotWinMode1, gotWinMode2);
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed.\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_genlist_item_tooltip_window_mode_get
+ * @{
+ * @objective Negative Test case 01: checks if function call with invalid value to get
+ * the tooltip window mode of a given genlist item works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the genlist item object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_item_tooltip_window_mode_get with invalid value instead of the genlist item object
+ *
+ * @passcondition
+ * @li Test passes if returned value is EINA_FALSE and there is no segmentation fault
+ * @}
+ */
+#ifdef NOT_APPROVED_FOR_BUILD
+START_TEST(utc_elm_genlist_item_tooltip_window_mode_get_n_1)
+{
+ if (TEST_FAIL == UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_genlist_item_tooltip_window_mode_get, item1))
+ {
+ 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_genlist_item_tooltip_window_mode_set
+ * @{
+ * @objective Negative Test case 01: checks if function call with invalid value to get
+ * the tooltip window mode of a given genlist item works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the genlist item object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_item_tooltip_window_mode_set with invalid value instead of the genlist item object
+ *
+ * @passcondition
+ * @li Test passes if returned value is EINA_FALSE and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_item_tooltip_window_mode_set_n_1)
+{
+ ecore_timer_add(0.2, _set_timer_cb_n, NULL);
+ ecore_main_loop_begin();
+
+ if (result1 != EINA_FALSE)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed. Set a mode to null item.", __FILE__, __LINE__);
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed.\n", __FILE__, __LINE__);
+}
+END_TEST
+/**
+ *@}
+ */
+
+TCase * _utc_elm_genlist_item_tooltip_window_mode_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_genlist_item_tooltip_window_mode_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_genlist_item_tooltip_window_mode_get_p_1);
+#ifdef NOT_APPROVED_FOR_BUILD
+ tcase_add_test(tcase, utc_elm_genlist_item_tooltip_window_mode_get_n_1);
+#endif
+ tcase_add_test(tcase, utc_elm_genlist_item_tooltip_window_mode_set_n_1);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *box = NULL, *genlist = NULL;
-static Elm_Genlist_Item_Class *gic = NULL;
-static Elm_Object_Item *item1 = NULL, *item2 = NULL;
-static Eina_Bool result1 = EINA_FALSE, result2 = EINA_TRUE;
-static Eina_Bool gotWinMode1 = EINA_FALSE, gotWinMode2 = EINA_TRUE;
-
-static const char* strTooltip1 = "I go to school every day.";
-static const char* strTooltip2 = "I am a doctor!";
-
-static Eina_Bool _tooltip_text_set_timer_cb(void* data)
-{
- elm_genlist_item_tooltip_text_set(item1, strTooltip1);
- elm_genlist_item_tooltip_text_set(item2, strTooltip2);
-
- return ECORE_CALLBACK_CANCEL;
-}
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_item_tooltip_window_mode_set elm_genlist_item_tooltip_window_mode_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create a main window
- * @step 3 Add a box to the main window
- * @step 4 Set a box as a resize object of the main window
- * @step 5 Add a genlist to the main window and set up it
- * @step 6 Add the genlist at the end of the box's pack list
- * @step 7 Add a genlist's item class in the genlist
- * @step 8 Append two items in the genlist
- * @step 9 Show main window and genlist
- * @step10 Set text to genlist item's tooltips
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- box = elm_box_add(main_win);
- if (box == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a box to the main window..", __FILE__, __LINE__);
- return;
- }
- elm_win_resize_object_add(main_win, box);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_box_pack_end(box, genlist);
- gic = elm_genlist_item_class_new();
- if (gic == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
- return;
- }
- item1 = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- if (item1 == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
- return;
- }
-
- item2 = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- if (item2 == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
- return;
- }
- ecore_timer_add(1, _tooltip_text_set_timer_cb, NULL);
-
- evas_object_show(main_win);
- evas_object_show(box);
- evas_object_show(genlist);
-}
-
-static void
-teardown(void)
-{
- elm_object_item_del(item1);
- elm_object_item_del(item2);
- item1 = NULL;
- item2 = NULL;
-
- if (main_win != NULL)
- {
- evas_object_del (main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-static Eina_Bool _set_timer_cb_p(void* data)
-{
- result1 = elm_genlist_item_tooltip_window_mode_set(item1, EINA_TRUE);
- result2 = elm_genlist_item_tooltip_window_mode_set(item2, EINA_FALSE);
-
- return ECORE_CALLBACK_CANCEL;
-}
-
-static Eina_Bool _set_timer_cb_n(void* data)
-{
-
- result1 = elm_genlist_item_tooltip_window_mode_set(NULL, EINA_TRUE);
- ecore_main_loop_quit();
- return ECORE_CALLBACK_CANCEL;
-}
-
-static Eina_Bool _get_and_quit_timer_cb_p(void *data)
-{
- gotWinMode1 = elm_genlist_item_tooltip_window_mode_get(item1);
- gotWinMode2 = elm_genlist_item_tooltip_window_mode_get(item2);
-
- ecore_main_loop_quit();
- return ECORE_CALLBACK_CANCEL;
-}
-
-/**
- * @addtogroup elm_genlist_item_tooltip_window_mode_set
- * @{
- * @objective Positive Test case 01: checks if function call with valid value to get
- * tooltip window mode of a given genlist item works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist item object
- *
- * @procedure
- * @step 1 Call elm_genlist_item_tooltip_window_mode_set to set starting value
- * @step 2 Call elm_genlist_item_tooltip_window_mode_get with valid value
- * @step 3 Compare two values
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_tooltip_window_mode_set_p_1)
-{
- if (main_win == NULL || genlist == NULL || gic == NULL || item1 == NULL || item2 == NULL)
- {
- return;
- }
-
-
- ecore_timer_add(2, _set_timer_cb_p, NULL);
- ecore_timer_add(4, _get_and_quit_timer_cb_p, NULL);
- ecore_main_loop_begin();
-
- if (result1 != EINA_TRUE || result2 != EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed. Cannot set a value.%i_%i", __FILE__, __LINE__, result1, result2);
- return;
- }
-
- if (gotWinMode1 != EINA_TRUE || gotWinMode2 != EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed. Cannot get correct value.%i_%i", __FILE__, __LINE__, gotWinMode1, gotWinMode2);
- return;
- }
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed.\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_genlist_item_tooltip_window_mode_set
- * @{
- * @objective Negative Test case 01: checks if function call with invalid value to get
- * the tooltip window mode of a given genlist item works properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the genlist item object
- *
- * @procedure
- * @step 1 Call elm_genlist_item_tooltip_window_mode_set with invalid value instead of the genlist item object
- *
- * @passcondition
- * @li Test passes if returned value is EINA_FALSE and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_item_tooltip_window_mode_set_n_1)
-{
-
- ecore_timer_add(2, _set_timer_cb_n, NULL);
- ecore_main_loop_begin();
-
- if (result1 != EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed. Set a mode to null item.", __FILE__, __LINE__);
- return;
- }
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed.\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_genlist_item_tooltip_window_mode_set()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_item_tooltip_window_mode_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_item_tooltip_window_mode_set_p_1);
- tcase_add_test(tcase, utc_elm_genlist_item_tooltip_window_mode_set_n_1);
- return tcase;
-}
if (main_win == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
}
evas_object_resize(main_win, 300, 300);
box = elm_box_add(main_win);
if (box == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a box to the main window..", __FILE__, __LINE__);
- return;
}
elm_win_resize_object_add(main_win, box);
genlist = elm_genlist_add(main_win);
if (genlist == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
}
evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_box_pack_end(box, genlist);
if (gic == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
- return;
}
gic->item_style = "default";
gic->func.text_get = _genlist_text_get;
if (item == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
- return;
}
// get data from item style
*/
START_TEST(utc_elm_genlist_item_update_p)
{
- if (main_win == NULL || box == NULL || genlist == NULL || gic == NULL || item == NULL)
- {
- return;
- }
- ecore_timer_add(2, _update_and_quit_timer_cb_p, NULL);
+ ecore_timer_add(0.2, _update_and_quit_timer_cb_p, NULL);
ecore_main_loop_begin();
if (((texts) && (is_text_cb_called == EINA_FALSE)) || ((contents) && (is_content_cb_called == EINA_FALSE)))
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..%i%i", __FILE__, __LINE__, is_text_cb_called, is_content_cb_called);
- return;
}
printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_longpress_timeout_get elm_genlist_longpress_timeout_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_longpress_timeout_get
- * @{
- * @objective Positive Test case checks if function call with valid value to get the timeout
- * in seconds for the longpress event works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist object
- *
- * @procedure
- * @step 1 Call elm_genlist_longpress_timeout_get with valid value
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_longpress_timeout_get_p)
-{
- if (main_win == NULL || genlist == NULL)
- {
- return;
- }
-
- double ret = 0.0;
-
- elm_genlist_longpress_timeout_set(genlist, 0.5);
- ret = elm_genlist_longpress_timeout_get(genlist);
- if (fabs(ret - 0.5) > DBL_EPSILON)
- {
- 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_genlist_longpress_timeout_get
- * @{
- * @objective Negative Test case checks if function call with invalid value to get the timeout
- * in seconds for the longpress event works properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the genlist object
- *
- * @procedure
- * @step 1 Call elm_genlist_longpress_timeout_get with invalid value instead of the genlist object
- *
- * @passcondition
- * @li Test passes if returned value is 0.0 and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_longpress_timeout_get_n)
-{
- double ret = 0.0;
-
- ret = elm_genlist_longpress_timeout_get(NULL);
- if (fabs(ret - 0.0) > DBL_EPSILON)
- {
- 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_genlist_longpress_timeout_get()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_longpress_timeout_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_longpress_timeout_get_p);
- tcase_add_test(tcase, utc_elm_genlist_longpress_timeout_get_n);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+static Evas_Object *main_win = NULL, *genlist = NULL;
+
+/**
+ * @addtogroup elm_genlist
+ * @{
+ * @defgroup elm_genlist_longpress_timeout_get elm_genlist_longpress_timeout_get()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show main window
+ * @step 3 Add a genlist to the main window
+ */
+
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ }
+ evas_object_show(main_win);
+ genlist = elm_genlist_add(main_win);
+ if (genlist == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
+ }
+}
+
+static void
+teardown(void)
+{
+ if (main_win != NULL)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_genlist_longpress_timeout_get
+ * @{
+ * @objective Positive Test case checks if function call with valid value to get the timeout
+ * in seconds for the longpress event works properly and without segmentation fault
+ * @n Input Data:
+ * @li the genlist object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_longpress_timeout_get with valid value
+ *
+ * @passcondition
+ * @li Test passes if returned value is same as specified value and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_longpress_timeout_get_p)
+{
+ double ret = 0.0;
+
+ elm_genlist_longpress_timeout_set(genlist, 0.5);
+ ret = elm_genlist_longpress_timeout_get(genlist);
+ if (fabs(ret - 0.5) > DBL_EPSILON)
+ {
+ 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_genlist_longpress_timeout_get
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to get the timeout
+ * in seconds for the longpress event works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the genlist object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_longpress_timeout_get with invalid value instead of the genlist object
+ *
+ * @passcondition
+ * @li Test passes if returned value is 0.0 and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_longpress_timeout_get_n)
+{
+ double ret = 0.0;
+
+ ret = elm_genlist_longpress_timeout_get(NULL);
+ if (fabs(ret - 0.0) > DBL_EPSILON)
+ {
+ 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_genlist_longpress_timeout_set
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to set the timeout
+ * in seconds for the longpress event works without segmentation fault
+ * @n Input Data:
+ * @li NULL, the genlist object
+ * @li 0.5, -2.0 as the timeout in seconds. Default is elm config value(1.0)
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_longpress_timeout_set with invalid value instead of the genlist object
+ * @step 2 Call elm_genlist_longpress_timeout_set with invalid value instead of the timeout in seconds
+ *
+ * @passcondition
+ * @li Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_longpress_timeout_set_n)
+{
+ elm_genlist_longpress_timeout_set(NULL, 0.5);
+ elm_genlist_longpress_timeout_set(genlist, -2.0);
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_genlist_longpress_timeout_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_genlist_longpress_timeout_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_genlist_longpress_timeout_get_p);
+ tcase_add_test(tcase, utc_elm_genlist_longpress_timeout_get_n);
+ tcase_add_test(tcase, utc_elm_genlist_longpress_timeout_set_n);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_longpress_timeout_set elm_genlist_longpress_timeout_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_longpress_timeout_set
- * @{
- * @objective Positive Test case checks if function call with valid values to set the timeout
- * in seconds for the longpress event works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist object
- * @li 0.5 as the timeout in seconds. Default is elm config value(1.0)
- *
- * @procedure
- * @step 1 Call elm_genlist_longpress_timeout_set with valid values
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_longpress_timeout_set_p)
-{
- if (main_win == NULL || genlist == NULL)
- {
- return;
- }
-
- double ret = 0.0;
-
- elm_genlist_longpress_timeout_set(genlist, 0.5);
- ret = elm_genlist_longpress_timeout_get(genlist);
- if (fabs(ret - 0.5) > DBL_EPSILON)
- {
- 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_genlist_longpress_timeout_set
- * @{
- * @objective Negative Test case checks if function call with invalid value to set the timeout
- * in seconds for the longpress event works without segmentation fault
- * @n Input Data:
- * @li NULL, the genlist object
- * @li 0.5, -2.0 as the timeout in seconds. Default is elm config value(1.0)
- *
- * @procedure
- * @step 1 Call elm_genlist_longpress_timeout_set with invalid value instead of the genlist object
- * @step 2 Call elm_genlist_longpress_timeout_set with invalid value instead of the timeout in seconds
- *
- * @passcondition
- * @li Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_longpress_timeout_set_n)
-{
- if (main_win == NULL || genlist == NULL)
- {
- return;
- }
-
- elm_genlist_longpress_timeout_set(NULL, 0.5);
- elm_genlist_longpress_timeout_set(genlist, -2.0);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_genlist_longpress_timeout_set()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_longpress_timeout_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_longpress_timeout_set_p);
- tcase_add_test(tcase, utc_elm_genlist_longpress_timeout_set_n);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_mode_get elm_genlist_mode_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_mode_get
- * @{
- * @objective Positive Test case checks if function call with valid value to get the horizontal
- * stretching mode works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist object
- *
- * @procedure
- * @step 1 Set the horizontal stretching mode
- * @step 2 Call elm_genlist_mode_get with valid value
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_mode_get_p)
-{
- if (main_win == NULL || genlist == NULL)
- {
- return;
- }
-
- Elm_List_Mode ret_mode = ELM_LIST_SCROLL;
-
- elm_genlist_mode_set(genlist, ELM_LIST_LIMIT);
- ret_mode = elm_genlist_mode_get(genlist);
- if (ret_mode != ELM_LIST_LIMIT)
- {
- 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_genlist_mode_get
- * @{
- * @objective Negative Test case checks if function call with invalid value to get the horizontal
- * stretching mode works properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the genlist object
- *
- * @procedure
- * @step 1 Call elm_genlist_mode_get with invalid value instead of the genlist object
- *
- * @passcondition
- * @li Test passes if returned value is ELM_LIST_LAST and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_mode_get_n)
-{
- if (TEST_FAIL == UNITEST_FUNC_NEG_RET(ELM_LIST_LAST, elm_genlist_mode_get, genlist))
- {
- 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_genlist_mode_get()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_mode_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_mode_get_p);
- tcase_add_test(tcase, utc_elm_genlist_mode_get_n);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+#include "../../utc_negative_unitest.h"
+static Evas_Object *main_win = NULL, *genlist = NULL;
+
+/**
+ * @addtogroup elm_genlist
+ * @{
+ * @defgroup elm_genlist_mode_get elm_genlist_mode_get()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show main window
+ * @step 3 Add a genlist to the main window
+ */
+
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ }
+ evas_object_show(main_win);
+ genlist = elm_genlist_add(main_win);
+ if (genlist == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
+ }
+}
+
+static void
+teardown(void)
+{
+ if (main_win != NULL)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_genlist_mode_get
+ * @{
+ * @objective Positive Test case checks if function call with valid value to get the horizontal
+ * stretching mode works properly and without segmentation fault
+ * @n Input Data:
+ * @li the genlist object
+ *
+ * @procedure
+ * @step 1 Set the horizontal stretching mode
+ * @step 2 Call elm_genlist_mode_get with valid value
+ *
+ * @passcondition
+ * @li Test passes if returned value is same as specified value and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_mode_get_p)
+{
+ Elm_List_Mode ret_mode = ELM_LIST_SCROLL;
+
+ elm_genlist_mode_set(genlist, ELM_LIST_LIMIT);
+ ret_mode = elm_genlist_mode_get(genlist);
+ if (ret_mode != ELM_LIST_LIMIT)
+ {
+ 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_genlist_mode_get
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to get the horizontal
+ * stretching mode works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the genlist object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_mode_get with invalid value instead of the genlist object
+ *
+ * @passcondition
+ * @li Test passes if returned value is ELM_LIST_LAST and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_mode_get_n)
+{
+ if (TEST_FAIL == UNITEST_FUNC_NEG_RET(ELM_LIST_LAST, elm_genlist_mode_get, genlist))
+ {
+ 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_genlist_mode_set
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to set the horizontal
+ * stretching mode works without segmentation fault
+ * @n Input Data:
+ * @li NULL, the genlist object
+ * @li ELM_LIST_LIMIT, ELM_LIST_COMPRESS - 1 as the mode to use (one of ELM_LIST_SCROLL or ELM_LIST_LIMIT). The default is ELM_LIST_SCROLL
+ * Note! ELM_LIST_COMPRESS is the min value of Elm_List_Mode enum type
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_mode_set with invalid value instead of the genlist object
+ * @step 2 Call elm_genlist_mode_set with invalid value instead of the mode to use
+ *
+ * @passcondition
+ * @li Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_mode_set_n)
+{
+ elm_genlist_mode_set(NULL, ELM_LIST_LIMIT);
+ elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS - 1);
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_genlist_mode_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_genlist_mode_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_genlist_mode_get_p);
+ tcase_add_test(tcase, utc_elm_genlist_mode_get_n);
+ tcase_add_test(tcase, utc_elm_genlist_mode_set_n);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_mode_set elm_genlist_mode_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_mode_set
- * @{
- * @objective Positive Test case checks if function call with valid values to set the horizontal
- * stretching mode works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist object
- * @li ELM_LIST_LIMIT as the mode to use (one of ELM_LIST_SCROLL or ELM_LIST_LIMIT). The default is ELM_LIST_SCROLL
- *
- * @procedure
- * @step 1 Call elm_genlist_mode_set with valid values
- * @step 2 Get the horizontal stretching mode
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_mode_set_p)
-{
- if (main_win == NULL || genlist == NULL)
- {
- return;
- }
-
- Elm_List_Mode ret_mode = ELM_LIST_SCROLL;
-
- elm_genlist_mode_set(genlist, ELM_LIST_LIMIT);
- ret_mode = elm_genlist_mode_get(genlist);
- if (ret_mode != ELM_LIST_LIMIT)
- {
- 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_genlist_mode_set
- * @{
- * @objective Negative Test case checks if function call with invalid value to set the horizontal
- * stretching mode works without segmentation fault
- * @n Input Data:
- * @li NULL, the genlist object
- * @li ELM_LIST_LIMIT, ELM_LIST_COMPRESS - 1 as the mode to use (one of ELM_LIST_SCROLL or ELM_LIST_LIMIT). The default is ELM_LIST_SCROLL
- * Note! ELM_LIST_COMPRESS is the min value of Elm_List_Mode enum type
- *
- * @procedure
- * @step 1 Call elm_genlist_mode_set with invalid value instead of the genlist object
- * @step 2 Call elm_genlist_mode_set with invalid value instead of the mode to use
- *
- * @passcondition
- * @li Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_mode_set_n)
-{
- if (main_win == NULL || genlist == NULL)
- {
- return;
- }
-
- elm_genlist_mode_set(NULL, ELM_LIST_LIMIT);
- elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS - 1);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_genlist_mode_set()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_mode_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_mode_set_p);
- tcase_add_test(tcase, utc_elm_genlist_mode_set_n);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_multi_select_get elm_genlist_multi_select_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_multi_select_get
- * @{
- * @objective Positive Test case checks if function call with valid value to get whether multi-selection
- * is enabled or disabled for a given genlist widget works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist object
- *
- * @procedure
- * @step 1 Set the genlist's multi-selection flag to EINA_TRUE
- * @step 2 Call elm_genlist_multi_select_get with valid value
- * @step 3 Set the genlist's multi-selection flag to EINA_FALSE
- * @step 4 Call elm_genlist_multi_select_get with valid value
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_multi_select_get_p)
-{
- if (main_win == NULL || genlist == NULL)
- {
- return;
- }
-
- Eina_Bool ret = EINA_FALSE;
-
- elm_genlist_multi_select_set(genlist, EINA_TRUE);
- ret = elm_genlist_multi_select_get(genlist);
- if (ret == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- elm_genlist_multi_select_set(genlist, EINA_FALSE);
- ret = elm_genlist_multi_select_get(genlist);
- if (ret == 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_genlist_multi_select_get
- * @{
- * @objective Negative Test case checks if function call with invalid value to get whether multi-selection
- * is enabled or disabled for a given genlist widget works properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the genlist object
- *
- * @procedure
- * @step 1 Call elm_genlist_multi_select_get with invalid value instead of the genlist object
- *
- * @passcondition
- * @li Test passes if returned value is EINA_FALSE and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_multi_select_get_n)
-{
- if (TEST_FAIL == UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_genlist_multi_select_get, genlist))
- {
- 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_genlist_multi_select_get()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_multi_select_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_multi_select_get_p);
- tcase_add_test(tcase, utc_elm_genlist_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 Evas_Object *main_win = NULL, *genlist = NULL;
+
+/**
+ * @addtogroup elm_genlist
+ * @{
+ * @defgroup elm_genlist_multi_select_get elm_genlist_multi_select_get()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show main window
+ * @step 3 Add a genlist to the main window
+ */
+
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ }
+ evas_object_show(main_win);
+ genlist = elm_genlist_add(main_win);
+ if (genlist == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
+ }
+}
+
+static void
+teardown(void)
+{
+ if (main_win != NULL)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_genlist_multi_select_get
+ * @{
+ * @objective Positive Test case checks if function call with valid value to get whether multi-selection
+ * is enabled or disabled for a given genlist widget works properly and without segmentation fault
+ * @n Input Data:
+ * @li the genlist object
+ *
+ * @procedure
+ * @step 1 Set the genlist's multi-selection flag to EINA_TRUE
+ * @step 2 Call elm_genlist_multi_select_get with valid value
+ * @step 3 Set the genlist's multi-selection flag to EINA_FALSE
+ * @step 4 Call elm_genlist_multi_select_get with valid value
+ *
+ * @passcondition
+ * @li Test passes if returned value is same as specified value and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_multi_select_get_p)
+{
+ Eina_Bool ret = EINA_FALSE;
+
+ elm_genlist_multi_select_set(genlist, EINA_TRUE);
+ ret = elm_genlist_multi_select_get(genlist);
+ if (ret == EINA_FALSE)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ elm_genlist_multi_select_set(genlist, EINA_FALSE);
+ ret = elm_genlist_multi_select_get(genlist);
+ if (ret == 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_genlist_multi_select_get
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to get whether multi-selection
+ * is enabled or disabled for a given genlist widget works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the genlist object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_multi_select_get with invalid value instead of the genlist object
+ *
+ * @passcondition
+ * @li Test passes if returned value is EINA_FALSE and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_multi_select_get_n)
+{
+ if (TEST_FAIL == UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_genlist_multi_select_get, genlist))
+ {
+ 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_genlist_multi_select_set
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to set whether multi-selection
+ * is enabled or disabled for a given genlist widget works without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the genlist object
+ * @li EINA_TRUE as the flag's value to set whether multi-selection is enabled or disabled for a given genlist widget. Default is disabled
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_multi_select_set with invalid value instead of the genlist object
+ *
+ * @passcondition
+ * @li Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_multi_select_set_n)
+{
+ CREATE_CHECKED_ARGS_ARRAY(1, 0)
+ UNITEST_FUNC_NEG_CA(elm_genlist_multi_select_set, genlist, EINA_TRUE)
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_genlist_multi_select_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_genlist_multi_select_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_genlist_multi_select_get_p);
+ tcase_add_test(tcase, utc_elm_genlist_multi_select_get_n);
+ tcase_add_test(tcase, utc_elm_genlist_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 Evas_Object *main_win = NULL, *genlist = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_multi_select_set elm_genlist_multi_select_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_multi_select_set
- * @{
- * @objective Positive Test case checks if function call with valid values to set whether multi-selection
- * is enabled or disabled for a given genlist widget works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist object
- * @li EINA_TRUE, EINA_FALSE as the flag's value to set whether multi-selection is enabled or disabled for a given genlist widget. Default is disabled
- *
- * @procedure
- * @step 1 Call elm_genlist_multi_select_set with EINA_TRUE as the flag's value to set whether multi-selection is enabled or disabled for a given genlist widget
- * @step 2 Get whether multi-selection is enabled or disabled for a given genlist widget
- * @step 3 Call elm_genlist_multi_select_set with EINA_FALSE as the flag's value to set whether multi-selection is enabled or disabled for a given genlist widget
- * @step 4 Get whether multi-selection is enabled or disabled for a given genlist widget
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_multi_select_set_p)
-{
- if (main_win == NULL || genlist == NULL)
- {
- return;
- }
-
- Eina_Bool ret = EINA_FALSE;
-
- elm_genlist_multi_select_set(genlist, EINA_TRUE);
- ret = elm_genlist_multi_select_get(genlist);
- if (ret == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- elm_genlist_multi_select_set(genlist, EINA_FALSE);
- ret = elm_genlist_multi_select_get(genlist);
- if (ret == 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_genlist_multi_select_set
- * @{
- * @objective Negative Test case checks if function call with invalid value to set whether multi-selection
- * is enabled or disabled for a given genlist widget works without segmentation fault
- * @n Input Data:
- * @li NULL instead of the genlist object
- * @li EINA_TRUE as the flag's value to set whether multi-selection is enabled or disabled for a given genlist widget. Default is disabled
- *
- * @procedure
- * @step 1 Call elm_genlist_multi_select_set with invalid value instead of the genlist object
- *
- * @passcondition
- * @li Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_multi_select_set_n)
-{
- CREATE_CHECKED_ARGS_ARRAY(1, 0)
- UNITEST_FUNC_NEG_CA(elm_genlist_multi_select_set, genlist, EINA_TRUE)
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_genlist_multi_select_set()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_multi_select_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_multi_select_set_p);
- tcase_add_test(tcase, utc_elm_genlist_multi_select_set_n);
- return tcase;
-}
if (main_win == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
}
evas_object_show(main_win);
genlist = elm_genlist_add(main_win);
if (genlist == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
}
evas_object_show(genlist);
elm_win_resize_object_add(main_win, genlist);
if (gic == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
- return;
}
for (index = 0; index < items_count; index++)
{
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item # %d in the genlist widget..", __FILE__, __LINE__, index);
is_items_added = EINA_FALSE;
- return;
}
}
}
*/
START_TEST(utc_elm_genlist_realized_items_get_p)
{
- if (main_win == NULL || genlist == NULL || gic == NULL || is_items_added == EINA_FALSE)
- {
- return;
- }
-
- ecore_timer_add(2.0, _get_timer_cb, NULL);
+ ecore_timer_add(0.2, _get_timer_cb, NULL);
ecore_main_loop_begin();
}
END_TEST
if (TEST_FAIL == UNITEST_FUNC_NEG_RET(NULL, elm_genlist_realized_items_get, genlist))
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
}
printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
}
if (main_win == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
}
evas_object_resize(main_win, 300, 300);
box = elm_box_add(main_win);
if (box == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a box to the main window..", __FILE__, __LINE__);
- return;
}
elm_win_resize_object_add(main_win, box);
genlist = elm_genlist_add(main_win);
if (genlist == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
}
evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_box_pack_end(box, genlist);
if (gic == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
- return;
}
gic->item_style = "default";
gic->func.text_get = _genlist_text_get;
if (item == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
- return;
}
// get data from item style
{
is_text_cb_called = EINA_FALSE;
is_content_cb_called = EINA_FALSE;
- ecore_timer_add(2.0, _get_timer_cb, NULL);
+ ecore_timer_add(0.2, _get_timer_cb, NULL);
one_run = EINA_TRUE;
}
else
*/
START_TEST(utc_elm_genlist_realized_items_update_p)
{
- if (main_win == NULL || box == NULL || genlist == NULL || gic == NULL || item == NULL)
- {
- return;
- }
-
- ecore_timer_add(4.0, _update_and_quit_timer_cb_p, NULL);
+ ecore_timer_add(0.4, _update_and_quit_timer_cb_p, NULL);
ecore_main_loop_begin();
if (((texts) && (is_text_cb_called == EINA_FALSE)) || ((contents) && (is_content_cb_called == 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__);
}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_reorder_mode_get elm_genlist_reorder_mode_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_reorder_mode_get
- * @{
- * @objective Positive Test case checks if function call with valid value to get the genlist
- * reorder mode works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist object
- *
- * @procedure
- * @step 1 Allow reordering of the items in the given genglist widget
- * @step 2 Call elm_genglist_reorder_mode_get with valid value
- * @step 3 Disallow reordering of the items in the given genglist widget
- * @step 4 Call elm_genglist_reorder_mode_get with valid value
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_reorder_mode_get_p)
-{
- if (main_win == NULL || genlist == NULL)
- {
- return;
- }
-
- Eina_Bool ret = EINA_FALSE;
-
- elm_genlist_reorder_mode_set(genlist, EINA_TRUE);
- ret = elm_genlist_reorder_mode_get(genlist);
- if (ret == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- elm_genlist_reorder_mode_set(genlist, EINA_FALSE);
- ret = elm_genlist_reorder_mode_get(genlist);
- if (ret == 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_genlist_reorder_mode_get
- * @{
- * @objective Negative Test case checks if function call with invalid value to get the genlist
- * reorder mode works properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the genlist object
- *
- * @procedure
- * @step 1 Call elm_genlist_reorder_mode_get with invalid value instead of the genlist object
- *
- * @passcondition
- * @li Test passes if returned value is EINA_FALSE and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_reorder_mode_get_n)
-{
- if (TEST_FAIL == UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_genlist_reorder_mode_get, genlist))
- {
- 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_genlist_reorder_mode_get()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_reorder_mode_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_reorder_mode_get_p);
- tcase_add_test(tcase, utc_elm_genlist_reorder_mode_get_n);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+#include "../../utc_negative_unitest.h"
+static Evas_Object *main_win = NULL, *genlist = NULL;
+
+/**
+ * @addtogroup elm_genlist
+ * @{
+ * @defgroup elm_genlist_reorder_mode_get elm_genlist_reorder_mode_get()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show main window
+ * @step 3 Add a genlist to the main window
+ */
+
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ }
+ evas_object_show(main_win);
+ genlist = elm_genlist_add(main_win);
+ if (genlist == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
+ }
+}
+
+static void
+teardown(void)
+{
+ if (main_win != NULL)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_genlist_reorder_mode_get
+ * @{
+ * @objective Positive Test case checks if function call with valid value to get the genlist
+ * reorder mode works properly and without segmentation fault
+ * @n Input Data:
+ * @li the genlist object
+ *
+ * @procedure
+ * @step 1 Allow reordering of the items in the given genglist widget
+ * @step 2 Call elm_genglist_reorder_mode_get with valid value
+ * @step 3 Disallow reordering of the items in the given genglist widget
+ * @step 4 Call elm_genglist_reorder_mode_get with valid value
+ *
+ * @passcondition
+ * @li Test passes if returned value is same as specified value and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_reorder_mode_get_p)
+{
+ Eina_Bool ret = EINA_FALSE;
+
+ elm_genlist_reorder_mode_set(genlist, EINA_TRUE);
+ ret = elm_genlist_reorder_mode_get(genlist);
+ if (ret == EINA_FALSE)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ elm_genlist_reorder_mode_set(genlist, EINA_FALSE);
+ ret = elm_genlist_reorder_mode_get(genlist);
+ if (ret == 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_genlist_reorder_mode_get
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to get the genlist
+ * reorder mode works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the genlist object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_reorder_mode_get with invalid value instead of the genlist object
+ *
+ * @passcondition
+ * @li Test passes if returned value is EINA_FALSE and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_reorder_mode_get_n)
+{
+ if (TEST_FAIL == UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_genlist_reorder_mode_get, genlist))
+ {
+ 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_genlist_reorder_mode_set
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to set the genlist
+ * reorder mode works without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the genlist object
+ * @li EINA_TRUE as the reorder mode (EINA_TRUE = on, EINA_FALSE = off)
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_reorder_mode_set with invalid value instead of the genlist object
+ *
+ * @passcondition
+ * @li Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_reorder_mode_set_n)
+{
+ CREATE_CHECKED_ARGS_ARRAY(1, 0)
+ UNITEST_FUNC_NEG_CA(elm_genlist_reorder_mode_set, genlist, EINA_TRUE)
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_genlist_reorder_mode_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_genlist_reorder_mode_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_genlist_reorder_mode_get_p);
+ tcase_add_test(tcase, utc_elm_genlist_reorder_mode_get_n);
+ tcase_add_test(tcase, utc_elm_genlist_reorder_mode_set_n);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_reorder_mode_set elm_genlist_reorder_mode_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_reorder_mode_set
- * @{
- * @objective Positive Test case checks if function call with valid values to set the genlist
- * reorder mode works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist object
- * @li EINA_TRUE, EINA_FALSE as the reorder mode (EINA_TRUE = on, EINA_FALSE = off)
- *
- * @procedure
- * @step 1 Call elm_genlist_reorder_mode_set with EINA_TRUE as the reorder mode
- * @step 2 Get the genlist reorder mode
- * @step 3 Call elm_genlist_reorder_mode_set with EINA_FALSE as the reorder mode
- * @step 4 Get the genlist reorder mode
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_reorder_mode_set_p)
-{
- if (main_win == NULL || genlist == NULL)
- {
- return;
- }
-
- Eina_Bool ret = EINA_FALSE;
-
- elm_genlist_reorder_mode_set(genlist, EINA_TRUE);
- ret = elm_genlist_reorder_mode_get(genlist);
- if (ret == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- elm_genlist_reorder_mode_set(genlist, EINA_FALSE);
- ret = elm_genlist_reorder_mode_get(genlist);
- if (ret == 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_genlist_reorder_mode_set
- * @{
- * @objective Negative Test case checks if function call with invalid value to set the genlist
- * reorder mode works without segmentation fault
- * @n Input Data:
- * @li NULL instead of the genlist object
- * @li EINA_TRUE as the reorder mode (EINA_TRUE = on, EINA_FALSE = off)
- *
- * @procedure
- * @step 1 Call elm_genlist_reorder_mode_set with invalid value instead of the genlist object
- *
- * @passcondition
- * @li Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_reorder_mode_set_n)
-{
- CREATE_CHECKED_ARGS_ARRAY(1, 0)
- UNITEST_FUNC_NEG_CA(elm_genlist_reorder_mode_set, genlist, EINA_TRUE)
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_genlist_reorder_mode_set()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_reorder_mode_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_reorder_mode_set_p);
- tcase_add_test(tcase, utc_elm_genlist_reorder_mode_set_n);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-
-static Evas_Object *main_win;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_scroller_policy_get elm_genlist_scroller_policy_get()
- *
- * @precondition
- * @step 1 Create and show a main window
- */
-static void
-setup(void)
-{
- printf (" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add (NULL, "main", ELM_WIN_BASIC);
- evas_object_show (main_win);
-}
-
-static void
-teardown(void)
-{
- if (NULL != main_win)
- {
- evas_object_del (main_win);
- main_win = NULL;
- }
- elm_shutdown ();
- printf (" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_scroller_policy_get
- * @{
- * @objective Get the scrollbar policy
- * @procedure
- * @step 1 Set scroller policy for genlist
- * @step 2 Get scroller policy for genlist
- *
- * @passcondition: Get values are same as set
- * @}
- */
-START_TEST(utc_elm_genlist_scroller_policy_get_p)
-{
- Evas_Object *genlist = NULL;
- genlist = elm_genlist_add (main_win);
- Elm_Scroller_Policy policy_h, policy_v;
-
- elm_genlist_scroller_policy_set (genlist, ELM_SCROLLER_POLICY_ON,
- ELM_SCROLLER_POLICY_OFF);
- elm_genlist_scroller_policy_get (genlist, &policy_h, &policy_v);
-
- if (policy_h != ELM_SCROLLER_POLICY_ON || policy_v != ELM_SCROLLER_POLICY_OFF)
- {
- 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_genlist_scroller_policy_get
- * @{
- * @objective Get the scrollbar policy of NULL
- * @procedure
- * @step 1 Call elm_genlist_scroller_policy_get with NULL
- *
- * @passcondition Get values are same as they was
- * @}
- */
-START_TEST(utc_elm_genlist_scroller_policy_get_n)
-{
- Elm_Scroller_Policy policy_h = ELM_SCROLLER_POLICY_ON;
- Elm_Scroller_Policy policy_v = ELM_SCROLLER_POLICY_OFF;
-
- elm_genlist_scroller_policy_get(NULL, &policy_h, &policy_v);
-
- if (policy_h != ELM_SCROLLER_POLICY_ON || policy_v != ELM_SCROLLER_POLICY_OFF)
- {
- 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_genlist_scroller_policy_get()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_scroller_policy_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_scroller_policy_get_p);
- tcase_add_test(tcase, utc_elm_genlist_scroller_policy_get_n);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+
+static Evas_Object *main_win;
+
+/**
+ * @addtogroup elm_genlist
+ * @{
+ * @defgroup elm_genlist_scroller_policy_get elm_genlist_scroller_policy_get()
+ *
+ * @precondition
+ * @step 1 Create and show a main window
+ */
+static void
+setup(void)
+{
+ printf (" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add (NULL, "main", ELM_WIN_BASIC);
+ evas_object_show (main_win);
+}
+
+static void
+teardown(void)
+{
+ if (NULL != main_win)
+ {
+ evas_object_del (main_win);
+ main_win = NULL;
+ }
+ elm_shutdown ();
+ printf (" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_genlist_scroller_policy_get
+ * @{
+ * @objective Get the scrollbar policy
+ * @procedure
+ * @step 1 Set scroller policy for genlist
+ * @step 2 Get scroller policy for genlist
+ *
+ * @passcondition: Get values are same as set
+ * @}
+ */
+START_TEST(utc_elm_genlist_scroller_policy_get_p)
+{
+ Evas_Object *genlist = NULL;
+ genlist = elm_genlist_add (main_win);
+ Elm_Scroller_Policy policy_h, policy_v;
+
+ elm_genlist_scroller_policy_set (genlist, ELM_SCROLLER_POLICY_ON,
+ ELM_SCROLLER_POLICY_OFF);
+ elm_genlist_scroller_policy_get (genlist, &policy_h, &policy_v);
+
+ if (policy_h != ELM_SCROLLER_POLICY_ON || policy_v != ELM_SCROLLER_POLICY_OFF)
+ {
+ 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_genlist_scroller_policy_get
+ * @{
+ * @objective Get the scrollbar policy of NULL
+ * @procedure
+ * @step 1 Call elm_genlist_scroller_policy_get with NULL
+ *
+ * @passcondition Get values are same as they was
+ * @}
+ */
+START_TEST(utc_elm_genlist_scroller_policy_get_n)
+{
+ Elm_Scroller_Policy policy_h = ELM_SCROLLER_POLICY_ON;
+ Elm_Scroller_Policy policy_v = ELM_SCROLLER_POLICY_OFF;
+
+ elm_genlist_scroller_policy_get(NULL, &policy_h, &policy_v);
+
+ if (policy_h != ELM_SCROLLER_POLICY_ON || policy_v != ELM_SCROLLER_POLICY_OFF)
+ {
+ 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_genlist_scroller_policy_set
+ * @{
+ * @objective Negative Test case 01
+ * @procedure
+ * @step 1 Call elm_genlist_scroller_policy_set with NULL
+ *
+ * @passcondition: no crash
+ * @}
+ */
+START_TEST(utc_elm_genlist_scroller_policy_set_n)
+{
+ elm_genlist_scroller_policy_set (NULL, ELM_SCROLLER_POLICY_AUTO , ELM_SCROLLER_POLICY_AUTO );
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+/**
+ *@}
+ */
+
+TCase * _utc_elm_genlist_scroller_policy_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_genlist_scroller_policy_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_genlist_scroller_policy_get_p);
+ tcase_add_test(tcase, utc_elm_genlist_scroller_policy_get_n);
+ tcase_add_test(tcase, utc_elm_genlist_scroller_policy_set_n);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-
-static Evas_Object *main_win;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_scroller_policy_set elm_genlist_scroller_policy_set()
- *
- * @precondition
- * @step 1 Create and show a main window
- */
-static void
-setup(void)
-{
- printf (" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add (NULL, "main", ELM_WIN_BASIC);
- evas_object_show (main_win);
-}
-
-static void
-teardown(void)
-{
- if (NULL != main_win)
- {
- evas_object_del (main_win);
- main_win = NULL;
- }
- elm_shutdown ();
- printf (" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_scroller_policy_set
- * @{
- * @objective Set the scrollbar policy
- * @procedure
- * @step 1 Set scroller policy for genlist
- * @step 2 Get the scrollbar policy
- *
- * @passcondition: Get value is same as set
- * @}
- */
-START_TEST(utc_elm_genlist_scroller_policy_set_p)
-{
- Evas_Object *genlist = NULL;
- genlist = elm_genlist_add (main_win);
- Elm_Scroller_Policy policy_h, policy_v;
-
- elm_genlist_scroller_policy_set (genlist, ELM_SCROLLER_POLICY_ON,
- ELM_SCROLLER_POLICY_OFF);
- elm_genlist_scroller_policy_get (genlist, &policy_h, &policy_v);
-
- if (policy_h != ELM_SCROLLER_POLICY_ON && policy_v != ELM_SCROLLER_POLICY_OFF)
- {
- 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_genlist_scroller_policy_set
- * @{
- * @objective Negative Test case 01
- * @procedure
- * @step 1 Call elm_genlist_scroller_policy_set with NULL
- *
- * @passcondition: no crash
- * @}
- */
-START_TEST(utc_elm_genlist_scroller_policy_set_n)
-{
- elm_genlist_scroller_policy_set (NULL, ELM_SCROLLER_POLICY_AUTO , ELM_SCROLLER_POLICY_AUTO );
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-/**
- *@}
- */
-
-TCase * _utc_elm_genlist_scroller_policy_set()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_scroller_policy_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_scroller_policy_set_p);
- tcase_add_test(tcase, utc_elm_genlist_scroller_policy_set_n);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-static Elm_Genlist_Item_Class *gic = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_select_mode_get elm_genlist_select_mode_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- * @step 4 Add a genlist's item class in the genlist
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window.", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window.", __FILE__, __LINE__);
- return;
- }
- gic = elm_genlist_item_class_new();
- if (gic == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget.", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del (main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_select_mode_get
- * @{
- * @objective Positive Test case 01: checks if function call with valid value to get
- * selection mode works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist item object
- *
- * @procedure
- * @step 1 Call elm_genlist_select_mode_set for gen list with ELM_OBJECT_SELECT_MODE_DEFAULT param
- * @step 2 Call elm_genlist_select_mode_get and check selection param
- * @step 3 Call elm_genlist_select_mode_set for gen list with ELM_OBJECT_SELECT_MODE_ALWAYS param
- * @step 4 Call elm_genlist_select_mode_get and check selection param
- * @step 5 Call elm_genlist_select_mode_set for gen list with ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY param
- * @step 6 Call elm_genlist_select_mode_get and check selection param
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_select_mode_get_p_1)
-{
- if (main_win == NULL || genlist == NULL || gic == NULL)
- {
- return;
- }
-
-
- elm_genlist_select_mode_set(genlist, ELM_OBJECT_SELECT_MODE_DEFAULT);
- if (elm_genlist_select_mode_get(genlist) != ELM_OBJECT_SELECT_MODE_DEFAULT)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.", __FILE__, __LINE__);
- return;
- }
-
- elm_genlist_select_mode_set(genlist, ELM_OBJECT_SELECT_MODE_ALWAYS);
- if (elm_genlist_select_mode_get(genlist) != ELM_OBJECT_SELECT_MODE_ALWAYS)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.", __FILE__, __LINE__);
- return;
- }
-
- elm_genlist_select_mode_set(genlist, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
- if (elm_genlist_select_mode_get(genlist) != ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY)
- {
- 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_genlist_select_mode_get
- * @{
- * @objective Negative Test case 01: checks if function call with invalid value
- * to get selection mode properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the genlist item object
- *
- * @procedure
- * @step 1 Call elm_genlist_select_mode_get with valid value to set selection mode
- * @step 2 Call elm_genlist_select_mode_get with invalid value instead of the genlist item object
- *
- * @passcondition
- * @li Test passes if returned value is ELM_OBJECT_SELECT_MODE_MAX and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_select_mode_get_n_1)
-{
-
- elm_genlist_select_mode_set(genlist, ELM_OBJECT_SELECT_MODE_NONE);
-
- //If getting mode is failed, it returns ELM_OBJECT_SELECT_MODE_MAX <== Elementary documentation !
- if (TEST_FAIL == UNITEST_FUNC_NEG_RET(ELM_OBJECT_SELECT_MODE_MAX, elm_genlist_select_mode_get, genlist))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.", __FILE__, __LINE__);
- }
- else
- {
- printf("[TEST_PASS]:: %s[%d] : Test has passed.\n", __FILE__, __LINE__);
- }
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_genlist_select_mode_get()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_select_mode_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_select_mode_get_p_1);
- tcase_add_test(tcase, utc_elm_genlist_select_mode_get_n_1);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+#include "../../utc_negative_unitest.h"
+static Evas_Object *main_win = NULL, *genlist = NULL;
+static Elm_Genlist_Item_Class *gic = NULL;
+
+/**
+ * @addtogroup elm_genlist
+ * @{
+ * @defgroup elm_genlist_select_mode_get elm_genlist_select_mode_get()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show main window
+ * @step 3 Add a genlist to the main window
+ * @step 4 Add a genlist's item class in the genlist
+ */
+
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window.", __FILE__, __LINE__);
+ }
+ evas_object_show(main_win);
+ genlist = elm_genlist_add(main_win);
+ if (genlist == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window.", __FILE__, __LINE__);
+ }
+ gic = elm_genlist_item_class_new();
+ if (gic == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget.", __FILE__, __LINE__);
+ }
+}
+
+static void
+teardown(void)
+{
+ if (main_win != NULL)
+ {
+ evas_object_del (main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_genlist_select_mode_get
+ * @{
+ * @objective Positive Test case 01: checks if function call with valid value to get
+ * selection mode works properly and without segmentation fault
+ * @n Input Data:
+ * @li the genlist item object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_select_mode_set for gen list with ELM_OBJECT_SELECT_MODE_DEFAULT param
+ * @step 2 Call elm_genlist_select_mode_get and check selection param
+ * @step 3 Call elm_genlist_select_mode_set for gen list with ELM_OBJECT_SELECT_MODE_ALWAYS param
+ * @step 4 Call elm_genlist_select_mode_get and check selection param
+ * @step 5 Call elm_genlist_select_mode_set for gen list with ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY param
+ * @step 6 Call elm_genlist_select_mode_get and check selection param
+ *
+ * @passcondition
+ * @li Test passes if returned value is same as specified value and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_select_mode_get_p_1)
+{
+ elm_genlist_select_mode_set(genlist, ELM_OBJECT_SELECT_MODE_DEFAULT);
+ if (elm_genlist_select_mode_get(genlist) != ELM_OBJECT_SELECT_MODE_DEFAULT)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.", __FILE__, __LINE__);
+ }
+
+ elm_genlist_select_mode_set(genlist, ELM_OBJECT_SELECT_MODE_ALWAYS);
+ if (elm_genlist_select_mode_get(genlist) != ELM_OBJECT_SELECT_MODE_ALWAYS)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.", __FILE__, __LINE__);
+ }
+
+ elm_genlist_select_mode_set(genlist, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ if (elm_genlist_select_mode_get(genlist) != ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY)
+ {
+ 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_genlist_select_mode_get
+ * @{
+ * @objective Negative Test case 01: checks if function call with invalid value
+ * to get selection mode properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the genlist item object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_select_mode_get with valid value to set selection mode
+ * @step 2 Call elm_genlist_select_mode_get with invalid value instead of the genlist item object
+ *
+ * @passcondition
+ * @li Test passes if returned value is ELM_OBJECT_SELECT_MODE_MAX and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_select_mode_get_n_1)
+{
+ elm_genlist_select_mode_set(genlist, ELM_OBJECT_SELECT_MODE_NONE);
+
+ //If getting mode is failed, it returns ELM_OBJECT_SELECT_MODE_MAX <== Elementary documentation !
+ if (TEST_FAIL == UNITEST_FUNC_NEG_RET(ELM_OBJECT_SELECT_MODE_MAX, elm_genlist_select_mode_get, genlist))
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.", __FILE__, __LINE__);
+ }
+ else
+ {
+ printf("[TEST_PASS]:: %s[%d] : Test has passed.\n", __FILE__, __LINE__);
+ }
+}
+END_TEST
+
+/**
+ * @addtogroup elm_genlist_select_mode_set
+ * @{
+ * @objective Negative Test case 01: checks if function call with invalid value
+ * to set selection mode properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the genlist item object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_select_mode_set with valid value to set selection mode
+ * @step 2 Call elm_genlist_select_mode_set with invalid value instead of the genlist item object
+ * @step 3 Call elm_genlist_select_mode_get to check if selection mode was changed
+ *
+ * @passcondition
+ * @li Test passes if returned value is EINA_FALSE and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_select_mode_set_n_1)
+{
+ elm_genlist_select_mode_set(genlist, ELM_OBJECT_SELECT_MODE_NONE);
+ elm_genlist_select_mode_set(NULL, ELM_OBJECT_SELECT_MODE_DEFAULT);
+ if (elm_genlist_select_mode_get(genlist) != ELM_OBJECT_SELECT_MODE_NONE)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_genlist_select_mode_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_genlist_select_mode_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_genlist_select_mode_get_p_1);
+ tcase_add_test(tcase, utc_elm_genlist_select_mode_get_n_1);
+ tcase_add_test(tcase, utc_elm_genlist_select_mode_set_n_1);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-static Elm_Genlist_Item_Class *gic = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_select_mode_set elm_genlist_select_mode_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- * @step 4 Add a genlist's item class in the genlist
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
- gic = elm_genlist_item_class_new();
- if (gic == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del (main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_select_mode_set
- * @{
- * @objective Positive Test case 01: checks if function call with valid value to set
- * selection mode works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist item object
- * @li selection mode
- *
- * @procedure
- * @step 1 Call elm_genlist_select_mode_set for gen list with ELM_OBJECT_SELECT_MODE_DEFAULT param
- * @step 2 Call elm_genlist_select_mode_get and check selection param
- * @step 3 Call elm_genlist_select_mode_set for gen list with ELM_OBJECT_SELECT_MODE_ALWAYS param
- * @step 4 Call elm_genlist_select_mode_get and check selection param
- * @step 5 Call elm_genlist_select_mode_set for gen list with ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY param
- * @step 6 Call elm_genlist_select_mode_get and check selection param
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_select_mode_set_p_1)
-{
- if (main_win == NULL || genlist == NULL || gic == NULL)
- {
- return;
- }
-
-
- elm_genlist_select_mode_set(genlist, ELM_OBJECT_SELECT_MODE_DEFAULT);
- if (elm_genlist_select_mode_get(genlist) != ELM_OBJECT_SELECT_MODE_DEFAULT)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- elm_genlist_select_mode_set(genlist, ELM_OBJECT_SELECT_MODE_ALWAYS);
- if (elm_genlist_select_mode_get(genlist) != ELM_OBJECT_SELECT_MODE_ALWAYS)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- elm_genlist_select_mode_set(genlist, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
- if (elm_genlist_select_mode_get(genlist) != ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY)
- {
- 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_genlist_select_mode_set
- * @{
- * @objective Negative Test case 01: checks if function call with invalid value
- * to set selection mode properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the genlist item object
- *
- * @procedure
- * @step 1 Call elm_genlist_select_mode_set with valid value to set selection mode
- * @step 2 Call elm_genlist_select_mode_set with invalid value instead of the genlist item object
- * @step 3 Call elm_genlist_select_mode_get to check if selection mode was changed
- *
- * @passcondition
- * @li Test passes if returned value is EINA_FALSE and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_select_mode_set_n_1)
-{
-
- elm_genlist_select_mode_set(genlist, ELM_OBJECT_SELECT_MODE_NONE);
- elm_genlist_select_mode_set(NULL, ELM_OBJECT_SELECT_MODE_DEFAULT);
- if (elm_genlist_select_mode_get(genlist) != ELM_OBJECT_SELECT_MODE_NONE)
- {
- 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_genlist_select_mode_set()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_select_mode_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_select_mode_set_p_1);
- tcase_add_test(tcase, utc_elm_genlist_select_mode_set_n_1);
- return tcase;
-}
if (main_win == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
}
evas_object_show(main_win);
genlist = elm_genlist_add(main_win);
if (genlist == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
}
gic = elm_genlist_item_class_new();
if (gic == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
- return;
}
item = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
if (item == NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
- return;
}
}
*/
START_TEST(utc_elm_genlist_selected_item_get_p)
{
- if (main_win == NULL || genlist == NULL || gic == NULL || item == NULL)
- {
- return;
- }
-
elm_genlist_item_selected_set(item, EINA_TRUE);
- ecore_timer_add(2.0, _get_timer_cb, NULL);
+ ecore_timer_add(0.2, _get_timer_cb, NULL);
ecore_main_loop_begin();
if(ret_selected_item != item) {
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
}
elm_genlist_item_selected_set(item, EINA_FALSE);
/*TODO Write a test for elm_genlist_item_selected_set*/
- ecore_timer_add(2.0, _get_timer_cb, NULL);
+ ecore_timer_add(0.2, _get_timer_cb, NULL);
ecore_main_loop_begin();
if(ret_selected_item != NULL) {
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
}
printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
}
if (TEST_FAIL == UNITEST_FUNC_NEG_RET(NULL, elm_genlist_selected_item_get, genlist))
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
}
printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-static Elm_Genlist_Item_Class *gic = NULL;
-static Elm_Object_Item *item = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_tree_effect_enabled_get elm_genlist_tree_effect_enabled_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- * @step 4 Add a genlist's item class in the genlist
- * @step 5 Append an item in the genlist
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
- gic = elm_genlist_item_class_new();
- if (gic == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
- return;
- }
- item = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_TREE, NULL, NULL);
- if (item == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_tree_effect_enabled_get
- * @{
- * @objective Positive Test case checks if function call with valid value to get Genlist
- * tree effect works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist object
- *
- * @procedure
- * @step 1 Enable Genlist tree effect
- * @step 2 Call elm_genlist_tree_effect_enabled_get with valid value
- * @step 3 Disable Genlist tree effect
- * @step 4 Call elm_genlist_tree_effect_enabled_get with valid value
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_tree_effect_enabled_get_p)
-{
- if (main_win == NULL || genlist == NULL || gic == NULL || item == NULL)
- {
- return;
- }
-
- Eina_Bool ret = EINA_FALSE;
-
- elm_genlist_tree_effect_enabled_set(genlist, EINA_TRUE);
- ret = elm_genlist_tree_effect_enabled_get(genlist);
- if (ret == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- elm_genlist_tree_effect_enabled_set(genlist, EINA_FALSE);
- ret = elm_genlist_tree_effect_enabled_get(genlist);
- if (ret == 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_genlist_tree_effect_enabled_get
- * @{
- * @objective Negative Test case checks if function call with invalid value to get Genlist
- * tree effect works properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the genlist object
- *
- * @procedure
- * @step 1 Call elm_genlist_tree_effect_enabled_get with invalid value instead of the genlist object
- *
- * @passcondition
- * @li Test passes if returned value is EINA_FASLE and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_tree_effect_enabled_get_n)
-{
- if (TEST_FAIL == UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_genlist_tree_effect_enabled_get, genlist))
- {
- 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_genlist_tree_effect_enabled_get()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_tree_effect_enabled_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_tree_effect_enabled_get_p);
- tcase_add_test(tcase, utc_elm_genlist_tree_effect_enabled_get_n);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+#include "../../utc_negative_unitest.h"
+static Evas_Object *main_win = NULL, *genlist = NULL;
+static Elm_Genlist_Item_Class *gic = NULL;
+static Elm_Object_Item *item = NULL;
+
+/**
+ * @addtogroup elm_genlist
+ * @{
+ * @defgroup elm_genlist_tree_effect_enabled_get elm_genlist_tree_effect_enabled_get()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show main window
+ * @step 3 Add a genlist to the main window
+ * @step 4 Add a genlist's item class in the genlist
+ * @step 5 Append an item in the genlist
+ */
+
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ }
+ evas_object_show(main_win);
+ genlist = elm_genlist_add(main_win);
+ if (genlist == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
+ }
+ gic = elm_genlist_item_class_new();
+ if (gic == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
+ }
+ item = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_TREE, NULL, NULL);
+ if (item == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
+ }
+}
+
+static void
+teardown(void)
+{
+ if (main_win != NULL)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_genlist_tree_effect_enabled_get
+ * @{
+ * @objective Positive Test case checks if function call with valid value to get Genlist
+ * tree effect works properly and without segmentation fault
+ * @n Input Data:
+ * @li the genlist object
+ *
+ * @procedure
+ * @step 1 Enable Genlist tree effect
+ * @step 2 Call elm_genlist_tree_effect_enabled_get with valid value
+ * @step 3 Disable Genlist tree effect
+ * @step 4 Call elm_genlist_tree_effect_enabled_get with valid value
+ *
+ * @passcondition
+ * @li Test passes if returned value is same as specified value and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_tree_effect_enabled_get_p)
+{
+ Eina_Bool ret = EINA_FALSE;
+
+ elm_genlist_tree_effect_enabled_set(genlist, EINA_TRUE);
+ ret = elm_genlist_tree_effect_enabled_get(genlist);
+ if (ret == EINA_FALSE)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ elm_genlist_tree_effect_enabled_set(genlist, EINA_FALSE);
+ ret = elm_genlist_tree_effect_enabled_get(genlist);
+ if (ret == 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_genlist_tree_effect_enabled_get
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to get Genlist
+ * tree effect works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the genlist object
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_tree_effect_enabled_get with invalid value instead of the genlist object
+ *
+ * @passcondition
+ * @li Test passes if returned value is EINA_FASLE and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_tree_effect_enabled_get_n)
+{
+ if (TEST_FAIL == UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_genlist_tree_effect_enabled_get, genlist))
+ {
+ 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_genlist_tree_effect_enabled_set
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to set Genlist
+ * tree effect works without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the genlist object
+ * @li EINA_TRUE as the tree effect status (EINA_TRUE = enabled, EINA_FALSE = disabled)
+ *
+ * @procedure
+ * @step 1 Call elm_genlist_tree_effect_enabled_set with invalid value instead of the genlist object
+ *
+ * @passcondition
+ * @li Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_genlist_tree_effect_enabled_set_n)
+{
+ CREATE_CHECKED_ARGS_ARRAY(1, 0)
+ UNITEST_FUNC_NEG_CA(elm_genlist_tree_effect_enabled_set, genlist, EINA_TRUE)
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_genlist_tree_effect_enabled_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_genlist_tree_effect_enabled_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_genlist_tree_effect_enabled_get_p);
+ tcase_add_test(tcase, utc_elm_genlist_tree_effect_enabled_get_n);
+ tcase_add_test(tcase, utc_elm_genlist_tree_effect_enabled_set_n);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL, *genlist = NULL;
-static Elm_Genlist_Item_Class *gic = NULL;
-static Elm_Object_Item *item = NULL;
-
-/**
- * @addtogroup elm_genlist
- * @{
- * @defgroup elm_genlist_tree_effect_enabled_set elm_genlist_tree_effect_enabled_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Add a genlist to the main window
- * @step 4 Add a genlist's item class in the genlist
- * @step 5 Append an item in the genlist
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- genlist = elm_genlist_add(main_win);
- if (genlist == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist widget to the main window..", __FILE__, __LINE__);
- return;
- }
- gic = elm_genlist_item_class_new();
- if (gic == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a genlist item class in the genlist widget..", __FILE__, __LINE__);
- return;
- }
- item = elm_genlist_item_append(genlist, gic, NULL, NULL, ELM_GENLIST_ITEM_TREE, NULL, NULL);
- if (item == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to append an item in the genlist widget..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win != NULL)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_genlist_tree_effect_enabled_set
- * @{
- * @objective Positive Test case checks if function call with valid values to set Genlist
- * tree effect works properly and without segmentation fault
- * @n Input Data:
- * @li the genlist object
- * @li EINA_TRUE, EINA_FALSE as the tree effect status (EINA_TRUE = enabled, EINA_FALSE = disabled)
- *
- * @procedure
- * @step 1 Call elm_genlist_tree_effect_enabled_set with EINA_TRUE as the tree effect status
- * @step 2 Get the tree effect status
- * @step 3 Call elm_genlist_tree_effect_enabled_set with EINA_FALSE as the tree effect status
- * @step 4 Get the tree effect status
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_tree_effect_enabled_set_p)
-{
- if (main_win == NULL || genlist == NULL || gic == NULL || item == NULL)
- {
- return;
- }
-
- Eina_Bool ret = EINA_FALSE;
-
- elm_genlist_tree_effect_enabled_set(genlist, EINA_TRUE);
- ret = elm_genlist_tree_effect_enabled_get(genlist);
- if (ret == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- elm_genlist_tree_effect_enabled_set(genlist, EINA_FALSE);
- ret = elm_genlist_tree_effect_enabled_get(genlist);
- if (ret == 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_genlist_tree_effect_enabled_set
- * @{
- * @objective Negative Test case checks if function call with invalid value to set Genlist
- * tree effect works without segmentation fault
- * @n Input Data:
- * @li NULL instead of the genlist object
- * @li EINA_TRUE as the tree effect status (EINA_TRUE = enabled, EINA_FALSE = disabled)
- *
- * @procedure
- * @step 1 Call elm_genlist_tree_effect_enabled_set with invalid value instead of the genlist object
- *
- * @passcondition
- * @li Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_genlist_tree_effect_enabled_set_n)
-{
- CREATE_CHECKED_ARGS_ARRAY(1, 0)
- UNITEST_FUNC_NEG_CA(elm_genlist_tree_effect_enabled_set, genlist, EINA_TRUE)
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_genlist_tree_effect_enabled_set()
-{
- TCase *tcase = tcase_create("utc_elm_genlist_tree_effect_enabled_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_genlist_tree_effect_enabled_set_p);
- tcase_add_test(tcase, utc_elm_genlist_tree_effect_enabled_set_n);
- return tcase;
-}