-utc_elm_radio_add.c
utc_elm_radio_group_add.c
-utc_elm_radio_state_value_get.c
-utc_elm_radio_state_value_set.c
-utc_elm_radio_value_set.c
-utc_elm_radio_value_get.c
+utc_elm_radio_state_value_get_set.c
+utc_elm_radio_value_get_set.c
utc_elm_radio_value_pointer_set.c
utc_elm_radio_selected_object_get.c
-utc_elm_radio_add.c
utc_elm_radio_group_add.c
-utc_elm_radio_state_value_get.c
-utc_elm_radio_state_value_set.c
-utc_elm_radio_value_set.c
-utc_elm_radio_value_get.c
+utc_elm_radio_state_value_get_set.c
+utc_elm_radio_value_get_set.c
utc_elm_radio_value_pointer_set.c
utc_elm_radio_selected_object_get.c
-utc_elm_radio_add.c
utc_elm_radio_group_add.c
-utc_elm_radio_state_value_get.c
-utc_elm_radio_state_value_set.c
-utc_elm_radio_value_set.c
-utc_elm_radio_value_get.c
+utc_elm_radio_state_value_get_set.c
+utc_elm_radio_value_get_set.c
utc_elm_radio_value_pointer_set.c
utc_elm_radio_selected_object_get.c
-utc_elm_radio_add.c
utc_elm_radio_group_add.c
-utc_elm_radio_state_value_get.c
-utc_elm_radio_state_value_set.c
-utc_elm_radio_value_set.c
-utc_elm_radio_value_get.c
+utc_elm_radio_state_value_get_set.c
+utc_elm_radio_value_get_set.c
utc_elm_radio_value_pointer_set.c
utc_elm_radio_selected_object_get.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_radio
- * @{
- * @defgroup elm_radio_add elm_radio_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_radio_add
- * @{
- * @objective Positive Test case checks if create a new radio works properly and doesn't cause segmentation fault
- * @n Input Data: the parent window object
- *
- * @procedure
- * @step 1 Add radio to main win
- *
- * @passcondition Returned value is not NULL and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_radio_add_p)
-{
- Evas_Object *radio = NULL;
-
- radio = elm_radio_add(main_win);
- if (radio == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- evas_object_del(radio);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_radio_add
- * @{
- * @objective Negative Test case checks if fucntion call with NULL instead of parent window
- * works properly and without segmentation fault
- * @n Input Data: NULL instead of the window object
- *
- * @procedure
- * @step 1 Call test function with NULL instead of the window object
- *
- * @passcondition Returned value is NULL and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_radio_add_n)
-{
- if (TEST_FAIL == UNITEST_FUNC_NEG_RET(NULL, elm_radio_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_radio_add()
-{
- TCase *tcase = tcase_create("utc_elm_radio_add");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_radio_add_p);
- tcase_add_test(tcase, utc_elm_radio_add_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;
-static Evas_Object *radio = NULL;
-
-/**
- * @addtogroup elm_radio
- * @{
- * @defgroup elm_radio_state_value_get elm_radio_state_value_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Create a new radio and add it to 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);
- radio = elm_radio_add(main_win);
- if (radio == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a radio..", __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_radio_state_value_get
- * @{
- * @objective Positive Test case checks if get radio object state value works properly and doesn't cause segmentation fault
- * @n Input Data: the radio object
- *
- * @procedure
- * @step 1 Set state value of radio object
- * @step 2 Get state value of radio object
- *
- * @passcondition Returned value is equal to 2 and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_radio_state_value_get_p)
-{
- int value = 0;
-
- if (radio == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- elm_radio_state_value_set(radio, 2);
- value = elm_radio_state_value_get(radio);
- if (value != 2)
- {
- 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_radio_state_value_get
- * @{
- * @objective Negative Test case checks if function call with NULL
- * instead of radio object works properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the radio object
- *
- * @procedure
- * @step 1 Call test function with NULL instead of the radio object
- *
- * @passcondition Returned value is equal to 0 and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_radio_state_value_get_n)
-{
- if (UNITEST_FUNC_NEG_RET(0, elm_radio_state_value_get, radio) == TEST_FAIL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_radio_state_value_get()
-{
- TCase *tcase = tcase_create("utc_elm_radio_state_value_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_radio_state_value_get_p);
- tcase_add_test(tcase, utc_elm_radio_state_value_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;
+static Evas_Object *radio = NULL;
+
+/**
+ * @addtogroup elm_radio
+ * @{
+ * @defgroup elm_radio_state_value_get elm_radio_state_value_get()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show main window
+ * @step 3 Create a new radio and add it to 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);
+ radio = elm_radio_add(main_win);
+ if (radio == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a radio..", __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_radio_state_value_get
+ * @{
+ * @objective Positive Test case checks if get radio object state value works properly and doesn't cause segmentation fault
+ * @n Input Data: the radio object
+ *
+ * @procedure
+ * @step 1 Set state value of radio object
+ * @step 2 Get state value of radio object
+ *
+ * @passcondition Returned value is equal to 2 and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_radio_state_value_get_p)
+{
+ int value = 0;
+
+ elm_radio_state_value_set(radio, 2);
+ value = elm_radio_state_value_get(radio);
+ if (value != 2)
+ {
+ 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_radio_state_value_get
+ * @{
+ * @objective Negative Test case checks if function call with NULL
+ * instead of radio object works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the radio object
+ *
+ * @procedure
+ * @step 1 Call test function with NULL instead of the radio object
+ *
+ * @passcondition Returned value is equal to 0 and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_radio_state_value_get_n)
+{
+ if (UNITEST_FUNC_NEG_RET(0, elm_radio_state_value_get, radio) == TEST_FAIL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_radio_state_value_set
+ * @{
+ * @objective Negative Test 01 case checks if function call with NULL
+ * instead of radio object works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the radio object
+ * @li 2
+ *
+ * @procedure
+ * @step 1 Call test function with NULL instead of the radio object
+ *
+ * @passcondition There is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_radio_state_value_set_n)
+{
+ CREATE_CHECKED_ARGS_ARRAY(1, 0);
+ UNITEST_FUNC_NEG_CA(elm_radio_state_value_set, radio, 2);
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_radio_add
+ * @{
+ * @objective Negative Test case checks if fucntion call with NULL instead of parent window
+ * works properly and without segmentation fault
+ * @n Input Data: NULL instead of the window object
+ *
+ * @procedure
+ * @step 1 Call test function with NULL instead of the window object
+ *
+ * @passcondition Returned value is NULL and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_radio_add_n)
+{
+ if (TEST_FAIL == UNITEST_FUNC_NEG_RET(NULL, elm_radio_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
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_radio_state_value_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_radio_state_value_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_radio_state_value_get_p);
+ tcase_add_test(tcase, utc_elm_radio_state_value_get_n);
+ tcase_add_test(tcase, utc_elm_radio_state_value_set_n);
+ tcase_add_test(tcase, utc_elm_radio_add_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;
-static Evas_Object *radio = NULL;
-
-/**
- * @addtogroup elm_radio
- * @{
- * @defgroup elm_radio_state_value_set elm_radio_state_value_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Create a new radio and add it to 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);
- radio = elm_radio_add(main_win);
- if (radio == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a radio..", __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_radio_state_value_set
- * @{
- * @objective Positive Test case checks if set radio object state value works properly and doesn't cause segmentation fault
- * @n Input Data:
- * @li the radio object
- * @li 2
- *
- * @procedure
- * @step 1 Set state value of radio object
- * @step 2 Get state value of radio object
- *
- * @passcondition Returned value is equal to 2 and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_radio_state_value_set_p)
-{
- int value = 0;
-
- if (radio == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- elm_radio_state_value_set(radio, 2);
- value = elm_radio_state_value_get(radio);
- if (value != 2)
- {
- 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_radio_state_value_set
- * @{
- * @objective Negative Test 01 case checks if function call with NULL
- * instead of radio object works properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the radio object
- * @li 2
- *
- * @procedure
- * @step 1 Call test function with NULL instead of the radio object
- *
- * @passcondition There is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_radio_state_value_set_n)
-{
- CREATE_CHECKED_ARGS_ARRAY(1, 0);
- UNITEST_FUNC_NEG_CA(elm_radio_state_value_set, radio, 2);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_radio_state_value_set()
-{
- TCase *tcase = tcase_create("utc_elm_radio_state_value_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_radio_state_value_set_p);
- tcase_add_test(tcase, utc_elm_radio_state_value_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;
-static Evas_Object *radio1 = NULL;
-static Evas_Object *radio2 = NULL;
-static Evas_Object *group = NULL;
-
-/**
- * @addtogroup elm_radio
- * @{
- * @defgroup elm_radio_value_get elm_radio_value_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Create two radio objects and add it to main window
- * @step 4 Create a new radio group and add it to 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);
- radio1 = elm_radio_add(main_win);
- if (radio1 == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a radio..", __FILE__, __LINE__);
- return;
- }
- radio2 = elm_radio_add(main_win);
- if (radio2 == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a radio..", __FILE__, __LINE__);
- return;
- }
- group = elm_radio_add(main_win);
- if (group == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a radio group..", __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_radio_value_get
- * @{
- * @objective Positive Test case checks if get radio group object value works properly and doesn't cause segmentation fault
- * @n Input Data: the radio group object
- *
- * @procedure
- * @step 1 Add two radios to group and setup its state 1,2 respectively
- * @step 2 Set group state to 2
- * @step 2 Get value of radio group object
- *
- * @passcondition Returned value is equal to 2 and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_radio_value_get_p)
-{
- int value = 0;
-
- if ((radio1 == NULL) || (radio2 == NULL) || (group == NULL))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- elm_radio_group_add(radio1, group);
- elm_radio_state_value_set(radio1, 1);
- elm_radio_group_add(radio2, group);
- elm_radio_state_value_set(radio2, 2);
- elm_radio_value_set(group, 2);
- value = elm_radio_value_get(group);
- if (value != 2)
- {
- 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_radio_value_get
- * @{
- * @objective Negative Test case checks if function call with NULL
- * instead of radio object works properly and without segmentation fault
- * @n Input Data: NULL instead of the radio object
- *
- * @procedure
- * @step 1 Call test function with NULL instead of the radio object
- *
- * @passcondition Returned value is equal to 0 and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_radio_value_get_n)
-{
- if (UNITEST_FUNC_NEG_RET(0, elm_radio_value_get, group) == TEST_FAIL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_radio_value_get()
-{
- TCase *tcase = tcase_create("utc_elm_radio_value_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_radio_value_get_p);
- tcase_add_test(tcase, utc_elm_radio_value_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;
+static Evas_Object *radio1 = NULL;
+static Evas_Object *radio2 = NULL;
+static Evas_Object *group = NULL;
+
+/**
+ * @addtogroup elm_radio
+ * @{
+ * @defgroup elm_radio_value_get elm_radio_value_get()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show main window
+ * @step 3 Create two radio objects and add it to main window
+ * @step 4 Create a new radio group and add it to 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);
+ radio1 = elm_radio_add(main_win);
+ if (radio1 == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a radio..", __FILE__, __LINE__);
+ }
+ radio2 = elm_radio_add(main_win);
+ if (radio2 == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a radio..", __FILE__, __LINE__);
+ }
+ group = elm_radio_add(main_win);
+ if (group == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a radio group..", __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_radio_value_get
+ * @{
+ * @objective Positive Test case checks if get radio group object value works properly and doesn't cause segmentation fault
+ * @n Input Data: the radio group object
+ *
+ * @procedure
+ * @step 1 Add two radios to group and setup its state 1,2 respectively
+ * @step 2 Set group state to 2
+ * @step 2 Get value of radio group object
+ *
+ * @passcondition Returned value is equal to 2 and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_radio_value_get_p)
+{
+ int value = 0;
+
+ elm_radio_group_add(radio1, group);
+ elm_radio_state_value_set(radio1, 1);
+ elm_radio_group_add(radio2, group);
+ elm_radio_state_value_set(radio2, 2);
+ elm_radio_value_set(group, 2);
+ value = elm_radio_value_get(group);
+ if (value != 2)
+ {
+ 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_radio_value_get
+ * @{
+ * @objective Negative Test case checks if function call with NULL
+ * instead of radio object works properly and without segmentation fault
+ * @n Input Data: NULL instead of the radio object
+ *
+ * @procedure
+ * @step 1 Call test function with NULL instead of the radio object
+ *
+ * @passcondition Returned value is equal to 0 and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_radio_value_get_n)
+{
+ if (UNITEST_FUNC_NEG_RET(0, elm_radio_value_get, group) == TEST_FAIL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_radio_value_set
+ * @{
+ * @objective Negative Test 01 case checks if function call with NULL
+ * instead of radio object works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the radio group object
+ * @li 3
+ *
+ * @procedure
+ * @step 1 Call test function with NULL instead of the radio object
+ *
+ * @passcondition There is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_radio_value_set_n)
+{
+ int start_value = elm_radio_value_get(group);
+
+ CREATE_CHECKED_ARGS_ARRAY(1, 0);
+ UNITEST_FUNC_NEG_CA(elm_radio_value_set, group, 3);
+ if (elm_radio_value_get(group) != start_value)
+ {
+ 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_radio_value_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_radio_value_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_radio_value_get_p);
+ tcase_add_test(tcase, utc_elm_radio_value_get_n);
+ tcase_add_test(tcase, utc_elm_radio_value_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;
-static Evas_Object *radio1 = NULL;
-static Evas_Object *radio2 = NULL;
-static Evas_Object *group = NULL;
-
-/**
- * @addtogroup elm_radio
- * @{
- * @defgroup elm_radio_value_set elm_radio_value_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Create two radio objects and add it to main window
- * @step 4 Create a new radio group and add it to 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);
- radio1 = elm_radio_add(main_win);
- if (radio1 == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a radio..", __FILE__, __LINE__);
- return;
- }
- radio2 = elm_radio_add(main_win);
- if (radio2 == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a radio..", __FILE__, __LINE__);
- return;
- }
- group = elm_radio_add(main_win);
- if (group == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a radio group..", __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_radio_value_set
- * @{
- * @objective Positive Test case checks if set radio group object value works properly and doesn't cause segmentation fault
- * @n Input Data:
- * @li the radio group object
- * @li 2
- *
- * @procedure
- * @step 1 Add two radios to group and setup its state 1,2 respectively
- * @step 2 Set group state to 2
- * @step 3 Get value of radio group object
- *
- * @passcondition Returned value is equal to 2 and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_radio_value_set_p)
-{
- int value = 0;
-
- if ((radio1 == NULL) || (radio2 == NULL) || (group == NULL))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- elm_radio_group_add(radio1, group);
- elm_radio_state_value_set(radio1, 1);
- elm_radio_group_add(radio2, group);
- elm_radio_state_value_set(radio2, 2);
- elm_radio_value_set(group, 2);
- value = elm_radio_value_get(group);
- if (value != 2)
- {
- 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_radio_value_set
- * @{
- * @objective Negative Test 01 case checks if function call with NULL
- * instead of radio object works properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the radio group object
- * @li 3
- *
- * @procedure
- * @step 1 Call test function with NULL instead of the radio object
- *
- * @passcondition There is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_radio_value_set_n)
-{
- int start_value = elm_radio_value_get(group);
-
- CREATE_CHECKED_ARGS_ARRAY(1, 0);
- UNITEST_FUNC_NEG_CA(elm_radio_value_set, group, 3);
- if (elm_radio_value_get(group) != start_value)
- {
- 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_radio_value_set()
-{
- TCase *tcase = tcase_create("utc_elm_radio_value_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_radio_value_set_p);
- tcase_add_test(tcase, utc_elm_radio_value_set_n);
- return tcase;
-}