--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../../utc_negative_unitest.h"
+Evas_Object *main_win = NULL;
+
+/**
+ * @addtogroup elm_combobox
+ * @{
+ * @defgroup elm_combobox_add()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create a main window
+ */
+
+static void
+setup(void) {
+ printf(" ============ Startup ============ \n");
+ elm_init(0, NULL);
+ 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;
+ }
+}
+
+static void
+teardown(void) {
+ if (main_win != NULL) {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_combobox_add
+ * @{
+ * @objective Positive Test case checks if function call with valid value to add a new combobox
+ * to the parent's canvas works properly and without segmentation fault
+ * @n Input Data:
+ * @li the window object
+ *
+ * @procedure
+ * @step 1 Call elm_combobox_add with valid value
+ *
+ * @passcondition
+ * @li Test passes if returned value is not NULL and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_combobox_add_p) {
+ if (main_win == NULL) {
+ return;
+ }
+
+ Evas_Object *combobox = NULL;
+
+ combobox = elm_combobox_add(main_win);
+ if (combobox == 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__);
+ evas_object_del(combobox);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_combobox_add
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to add a new combobox
+ * to the parent's canvas works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the window object
+ *
+ * @procedure
+ * @step 1 Call elm_combobox_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_combobox_add_n) {
+ if (TEST_FAIL == UNITEST_FUNC_NEG_RET(NULL, elm_combobox_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
+
+/**
+ * @}
+ */
+Suite *
+test_suite(void) {
+ Suite *suite = suite_create("utc_elm_combobox_add");
+
+ TCase *tcase = tcase_create("TCase");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_combobox_add_p);
+ tcase_add_test(tcase, utc_elm_combobox_add_n);
+ suite_add_tcase(suite, tcase);
+
+ return suite;
+}
+
+int
+main() {
+ int number_failed;
+
+ Suite *suite = test_suite();
+ SRunner *srunner = srunner_create(suite);
+ srunner_set_log(srunner, "utc_elm_combobox_add.log");
+ srunner_set_xml(srunner, "utc_elm_combobox_add.xml");
+ srunner_run_all(srunner, CK_NORMAL);
+ number_failed = srunner_ntests_failed(srunner);
+ srunner_free(srunner);
+
+ return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../../utc_negative_unitest.h"
+
+Evas_Object *main_win = NULL, *combobox = NULL;
+static Eina_Bool is_expanded = EINA_FALSE;
+
+static char *
+gl_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED) {
+
+ char buf[256];
+ snprintf(buf, sizeof(buf), "Item # %i", (int)(uintptr_t)data);
+ return strdup(buf);
+}
+
+static void
+_combobox_dismissed_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) {
+ is_expanded = EINA_FALSE;
+ printf("[Debug]:: %s[%d] : _combobox_dismissed_cb ", __FILE__, __LINE__);
+ ecore_main_loop_quit();
+}
+
+static void
+_combobox_expanded_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) {
+ is_expanded = EINA_TRUE;
+ printf("[Debug]:: %s[%d] : _combobox_expand_cb ", __FILE__, __LINE__);
+ ecore_main_loop_quit();
+}
+
+/**
+ * @add to group elm_combobox
+ * @{
+ * @defgroup elm_combobox_hover_begin();
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show main window
+ * @step 3 Add a combobox to the main window
+ * @step 4 Add items in combobox
+ * @step 5 Register "expand" & "dismiss" callback of combobox
+ */
+static void
+setup(void) {
+ Evas_Object *bg;
+ Elm_Genlist_Item_Class *itc;
+ Evas_Object *bx;
+
+ elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
+
+ printf(" ============ Startup ============ \n");
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL) {
+ return;
+ }
+
+ bx = elm_box_add(main_win);
+ evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(main_win, bx);
+ evas_object_show(bx);
+
+ combobox = elm_combobox_add(main_win);
+
+ if (combobox == NULL) {
+ return;
+ }
+ evas_object_size_hint_weight_set(combobox, EVAS_HINT_EXPAND, 0);
+ evas_object_size_hint_align_set(combobox, EVAS_HINT_FILL, 0);
+ elm_object_part_text_set(combobox, "guide", "A Simple list");
+ elm_box_pack_end(bx, combobox);
+ evas_object_show(combobox);
+
+ itc = elm_genlist_item_class_new();
+ itc->item_style = "default";
+ itc->func.text_get = gl_text_get;
+ itc->func.content_get = NULL;
+ itc->func.state_get = NULL;
+ itc->func.filter_get = NULL;
+ itc->func.del = NULL;
+
+ for (int i = 0; i < 2; i++)
+ elm_genlist_item_append(combobox, itc, (void *)(uintptr_t)i,
+ NULL, ELM_GENLIST_ITEM_NONE, NULL, (void*)(uintptr_t)(i * 10));
+ evas_object_smart_callback_add(combobox, "dismissed",
+ _combobox_dismissed_cb, NULL);
+ evas_object_smart_callback_add(combobox, "expanded",
+ _combobox_expanded_cb, NULL);
+
+ 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");
+}
+
+static Eina_Bool
+_combobox_expand_state_cb(void *data) {
+ ecore_main_loop_quit();
+ return EINA_FALSE;
+}
+
+/**
+ * @add to group elm_combobox_hover_begin & elm_combobox_hover_end
+ * @{
+ * @objective Positive test case checks
+ * 1. whether function call to change the expanded state of the combobox works properly
+ * 2. whether function call to change the compress state of the combobox works properly
+ * @n Input Data: the combobox object
+ *
+ * @procedure
+ * @step 1 Call the elm_combobox_hover_begin() for the combobox to change the expanded state to expanded
+ * @step 2 Get the expanded state of the combobox
+ * @step 3 Call the elm_combobox_hover_end() for the combobox to change the expanded state to collapsed
+ * @step 4 Get the expanded state of the combobox
+ *
+ * @passcondition Test passes if returned values are the same as set values
+ * @}
+ */
+START_TEST(utc_elm_combobox_hover_begin_and_end_p) {
+ if (main_win == NULL || combobox == NULL) {
+ ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed in precondition", __FILE__, __LINE__);
+ return;
+ }
+ elm_combobox_hover_begin(combobox);
+ ecore_main_loop_begin();
+
+ if (is_expanded == EINA_FALSE) {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : elm_combobox_hover_begin() has failed", __FILE__, __LINE__);
+ return;
+ }
+ if (elm_combobox_expanded_get(combobox) == EINA_FALSE) {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : elm_combobox_hover_begin() has failed", __FILE__, __LINE__);
+ return;
+ }
+
+ elm_combobox_hover_end(combobox);
+ ecore_main_loop_begin();
+
+ if (is_expanded == EINA_TRUE) {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : elm_combobox_hover_end() has failed ...", __FILE__, __LINE__);
+ return;
+ }
+ if (elm_combobox_expanded_get(combobox) == EINA_TRUE) {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : elm_combobox_hover_begin() has failed", __FILE__, __LINE__);
+ return;
+ }
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_combobox_hover_begin
+ * @{
+ * @objective Negative test case checks whether function call with NULL instead of the combobox object
+ * works properly and without segmentation fault
+ * @n Input Data: NULL instead of the combobox object
+ *
+ * @procedure
+ * @step 1 Call function with NULL instead of the combobox object
+ *
+ * @passcondition Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_combobox_hover_begin_n) {
+ UNITEST_FUNC_NEG(elm_combobox_hover_begin, NULL);
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_combobox_hover_end
+ * @{
+ * @objective Negative test case checks whether function call with NULL instead of the combobox object
+ * works properly and without segmentation fault
+ * @n Input Data: NULL instead of the combobox object
+ *
+ * @procedure
+ * @step 1 Call function with NULL instead of the combobox object
+ *
+ * @passcondition Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_combobox_hover_end_n) {
+ UNITEST_FUNC_NEG(elm_combobox_hover_end, NULL);
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @}
+ */
+Suite *
+test_suite(void) {
+ Suite *suite = suite_create("utc_elm_combobox_hover_begin_and_end");
+
+ TCase *tcase = tcase_create("TCase");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_combobox_hover_begin_and_end_p);
+ tcase_add_test(tcase, utc_elm_combobox_hover_begin_n);
+ tcase_add_test(tcase, utc_elm_combobox_hover_end_n);
+ suite_add_tcase(suite, tcase);
+
+ return suite;
+}
+
+int
+main() {
+ int number_failed;
+
+ Suite *suite = test_suite();
+ SRunner *srunner = srunner_create(suite);
+ srunner_set_log(srunner, "utc_elm_combobox_hover_begin_and_end.log");
+ srunner_set_xml(srunner, "utc_elm_combobox_hover_begin_and_end.xml");
+ srunner_run_all(srunner, CK_NORMAL);
+ number_failed = srunner_ntests_failed(srunner);
+ srunner_free(srunner);
+
+ return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}