-utc_evas_object_data_set.c
-utc_evas_object_data_get.c
+utc_evas_object_data_get_set.c
utc_evas_object_data_del.c
-utc_evas_object_data_set.c
-utc_evas_object_data_get.c
+utc_evas_object_data_get_set.c
utc_evas_object_data_del.c
-utc_evas_object_data_set.c
-utc_evas_object_data_get.c
+utc_evas_object_data_get_set.c
utc_evas_object_data_del.c
-utc_evas_object_data_set.c
-utc_evas_object_data_get.c
+utc_evas_object_data_get_set.c
utc_evas_object_data_del.c
+++ /dev/null
-#include <check.h>
-#include <Evas.h>
-#include "../../../utc_negative_unitest.h"
-
-#define KEY "test_data"
-
-/**
- * @addtogroup evas_object_data
- * @{
- * @defgroup evas_object_data_get evas_object_data_get()
- *
- *
- * @precondition
- * @step 1 evas initialized with evas_init()
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- evas_init();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- evas_shutdown();
-}
-
-/**
- * @addtogroup evas_object_data_get
- * @{
- * @objective Positive test case checks if function set and get data properly.
- * @n Input Data:
- * @li Pointer to text Evas_Object;
- * @li "test_data" - data key.
- *
- * @procedure
- * @step 1 Create new Evas and Evas_Object
- * @step 2 Set data for the object
- * @step 3 Get data from the object and compare it with the initial one.
- *
- * @passcondition Function returns pointer the same as was set with evas_object_data_set().
- * @}
- */
-START_TEST(utc_evas_object_data_get_p)
-{
- Evas *evas = evas_new();
- Evas_Object *obj = evas_object_text_add(evas);
-
- if (!obj)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Evas_Object is not created..", __FILE__, __LINE__);
- evas_free(evas);
- return;
- }
- const int my_data = 42;
- int result = TEST_FAIL;
-
- evas_object_data_set(obj, KEY, &my_data);
- int *data_ptr = (int*)evas_object_data_get(obj, KEY);
-
- if (!data_ptr)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Function has returned NULL..", __FILE__, __LINE__);
- }
- else if (data_ptr != &my_data)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Returned and initial pointers don't match..", __FILE__, __LINE__);
- }
- else
- {
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- result = TEST_PASS;
- }
- evas_free(evas);
-}
-END_TEST
-
-/**
- * @addtogroup evas_object_data_get
- * @{
- * @objective Negative test case 1 checks if function works properly if it is called
- * when getting data from evas object without data.
- * @n Input Data:
- * @li Pointer to text Evas_Object without data;
- * @li "test_data" - data key.
- *
- * @procedure
- * @step 1 Create new Evas and Evas_Object
- * @step 2 Try get data from it
- * @step 3 Check if the data is NULL
- *
- * @passcondition Function returns NULL.
- * @}
- */
-START_TEST(utc_evas_object_data_get_n)
-{
- Evas *evas = evas_new();
- Evas_Object *obj = evas_object_text_add(evas);
-
- if (!obj)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Evas_Object is not created..", __FILE__, __LINE__);
- evas_free(evas);
- return;
- }
-
- if (evas_object_data_get(obj, KEY))
- {
- evas_free(evas);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- evas_free(evas);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup evas_object_data_get
- * @{
- * @objective Negative test case 2 checks if function doesn't cause segmentation fault
- * and returns NULL if it is called with NULL instead of any argument.
- * @n Input Data: pointer to Evas_Object and "test_data" as key.
- *
- * @procedure
- * @step 1 Create new Evas
- * @step 2 Create new text Evas_Object
- * @step 3 Call function 2 times and pass (in turn) NULL instead of one from valid arguments.
- *
- * @passcondition Function doesn't cause segmentation fault and returns NULL.
- * @}
- */
-START_TEST(utc_evas_object_data_get_n2)
-{
- Evas *evas = evas_new();
- Evas_Object *obj = evas_object_text_add(evas);
-
- if (!obj)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Evas_Object is not created..", __FILE__, __LINE__);
- evas_free(evas);
- return;
- }
-
- if (UNITEST_FUNC_NEG_RET(NULL, evas_object_data_get, obj, KEY) == TEST_FAIL)
- {
- evas_free(evas);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- evas_free(evas);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-/**
- *@}
- */
-
-TCase * _utc_evas_object_data_get()
-{
- TCase *tcase = tcase_create("utc_evas_object_data_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_evas_object_data_get_p);
- tcase_add_test(tcase, utc_evas_object_data_get_n);
- tcase_add_test(tcase, utc_evas_object_data_get_n2);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Evas.h>
+#include "../../../utc_negative_unitest.h"
+
+#define KEY "test_data"
+
+/**
+ * @addtogroup evas_object_data
+ * @{
+ * @defgroup evas_object_data_get evas_object_data_get()
+ *
+ *
+ * @precondition
+ * @step 1 evas initialized with evas_init()
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ evas_init();
+}
+
+static void
+teardown(void)
+{
+ printf(" ============ Cleanup ============ \n");
+ evas_shutdown();
+}
+
+/**
+ * @addtogroup evas_object_data_get
+ * @{
+ * @objective Positive test case checks if function set and get data properly.
+ * @n Input Data:
+ * @li Pointer to text Evas_Object;
+ * @li "test_data" - data key.
+ *
+ * @procedure
+ * @step 1 Create new Evas and Evas_Object
+ * @step 2 Set data for the object
+ * @step 3 Get data from the object and compare it with the initial one.
+ *
+ * @passcondition Function returns pointer the same as was set with evas_object_data_set().
+ * @}
+ */
+START_TEST(utc_evas_object_data_get_p)
+{
+ Evas *evas = evas_new();
+ Evas_Object *obj = evas_object_text_add(evas);
+
+ if (!obj)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Evas_Object is not created..", __FILE__, __LINE__);
+ }
+ const int my_data = 42;
+ int result = TEST_FAIL;
+
+ evas_object_data_set(obj, KEY, &my_data);
+ int *data_ptr = (int*)evas_object_data_get(obj, KEY);
+
+ if (!data_ptr)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Function has returned NULL..", __FILE__, __LINE__);
+ }
+ else if (data_ptr != &my_data)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Returned and initial pointers don't match..", __FILE__, __LINE__);
+ }
+ else
+ {
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+ result = TEST_PASS;
+ }
+ evas_free(evas);
+}
+END_TEST
+
+/**
+ * @addtogroup evas_object_data_get
+ * @{
+ * @objective Negative test case 1 checks if function works properly if it is called
+ * when getting data from evas object without data.
+ * @n Input Data:
+ * @li Pointer to text Evas_Object without data;
+ * @li "test_data" - data key.
+ *
+ * @procedure
+ * @step 1 Create new Evas and Evas_Object
+ * @step 2 Try get data from it
+ * @step 3 Check if the data is NULL
+ *
+ * @passcondition Function returns NULL.
+ * @}
+ */
+START_TEST(utc_evas_object_data_get_n)
+{
+ Evas *evas = evas_new();
+ Evas_Object *obj = evas_object_text_add(evas);
+
+ if (!obj)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Evas_Object is not created..", __FILE__, __LINE__);
+ }
+
+ if (evas_object_data_get(obj, KEY))
+ {
+ evas_free(evas);
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ evas_free(evas);
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup evas_object_data_get
+ * @{
+ * @objective Negative test case 2 checks if function doesn't cause segmentation fault
+ * and returns NULL if it is called with NULL instead of any argument.
+ * @n Input Data: pointer to Evas_Object and "test_data" as key.
+ *
+ * @procedure
+ * @step 1 Create new Evas
+ * @step 2 Create new text Evas_Object
+ * @step 3 Call function 2 times and pass (in turn) NULL instead of one from valid arguments.
+ *
+ * @passcondition Function doesn't cause segmentation fault and returns NULL.
+ * @}
+ */
+START_TEST(utc_evas_object_data_get_n2)
+{
+ Evas *evas = evas_new();
+ Evas_Object *obj = evas_object_text_add(evas);
+
+ if (!obj)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Evas_Object is not created..", __FILE__, __LINE__);
+ }
+
+ if (UNITEST_FUNC_NEG_RET(NULL, evas_object_data_get, obj, KEY) == TEST_FAIL)
+ {
+ evas_free(evas);
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ evas_free(evas);
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup evas_object_data_set
+ * @{
+ * @objective Negative test case checks if function doesn't cause segmentation fault
+ * if it is called with NULL instead of any argument.
+ * @n Input Data:
+ * @li Pointer to text Evas_Object;
+ * @li "test_data" - data key;
+ * @li pointer to integer value 42.
+ *
+ * @procedure
+ * @step 1 Create new Evas
+ * @step 2 Create new text Evas_Object
+ * @step 3 Call function 3 times and pass (in turn) NULL instead of one from valid arguments.
+ *
+ * @passcondition Function doesn't cause segmentation fault.
+ * @}
+ */
+START_TEST(utc_evas_object_data_set_n)
+{
+ const int my_data = 42;
+ Evas *evas = evas_new();
+ Evas_Object *obj = evas_object_text_add(evas);
+
+ if (!obj)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Evas_Object is not created..", __FILE__, __LINE__);
+ }
+
+ UNITEST_FUNC_NEG(evas_object_data_set, obj, KEY, &my_data);
+
+ evas_free(evas);
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_evas_object_data_get_set()
+{
+ TCase *tcase = tcase_create("utc_evas_object_data_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_evas_object_data_get_p);
+ tcase_add_test(tcase, utc_evas_object_data_get_n);
+ tcase_add_test(tcase, utc_evas_object_data_get_n2);
+ tcase_add_test(tcase, utc_evas_object_data_set_n);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Evas.h>
-#include "../../../utc_negative_unitest.h"
-
-#define KEY "test_data"
-
-/**
- * @addtogroup evas_object_data
- * @{
- * @defgroup evas_object_data_set evas_object_data_set()
- *
- *
- * @precondition
- * @step 1 evas initialized with evas_init()
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- evas_init();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- evas_shutdown();
-}
-
-/**
- * @addtogroup evas_object_data_set
- * @{
- * @objective Positive test case checks if function set data properly.
- * @n Input Data:
- * @li Pointer to text Evas_Object;
- * @li "test_data" - data key;
- * @li pointer to integer value 42.
- *
- * @procedure
- * @step 1 Create new Evas and Evas_Object
- * @step 2 Set data for the object
- * @step 3 Get data from the object and compare it with the initial one.
- *
- * @passcondition Function evas_object_data_get() returns pointer the same as was set.
- * @}
- */
-START_TEST(utc_evas_object_data_set_p)
-{
- Evas *evas = evas_new();
- Evas_Object *obj = evas_object_text_add(evas);
-
- if (!obj)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Evas_Object is not created..", __FILE__, __LINE__);
- evas_free(evas);
- return;
- }
- const int my_data = 42;
- int result = TEST_FAIL;
-
- evas_object_data_set(obj, KEY, &my_data);
- int *data_ptr = (int*)evas_object_data_get(obj, KEY);
-
- if (!data_ptr)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Function has returned NULL..", __FILE__, __LINE__);
- }
- else if (data_ptr != &my_data)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Returned and initial pointers don't match..", __FILE__, __LINE__);
- }
- else
- {
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- result = TEST_PASS;
- }
- evas_free(evas);
-}
-END_TEST
-
-/**
- * @addtogroup evas_object_data_set
- * @{
- * @objective Negative test case checks if function doesn't cause segmentation fault
- * if it is called with NULL instead of any argument.
- * @n Input Data:
- * @li Pointer to text Evas_Object;
- * @li "test_data" - data key;
- * @li pointer to integer value 42.
- *
- * @procedure
- * @step 1 Create new Evas
- * @step 2 Create new text Evas_Object
- * @step 3 Call function 3 times and pass (in turn) NULL instead of one from valid arguments.
- *
- * @passcondition Function doesn't cause segmentation fault.
- * @}
- */
-START_TEST(utc_evas_object_data_set_n)
-{
- const int my_data = 42;
- Evas *evas = evas_new();
- Evas_Object *obj = evas_object_text_add(evas);
-
- if (!obj)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Evas_Object is not created..", __FILE__, __LINE__);
- evas_free(evas);
- return;
- }
-
- UNITEST_FUNC_NEG(evas_object_data_set, obj, KEY, &my_data);
-
- evas_free(evas);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-/**
- *@}
- */
-
-TCase * _utc_evas_object_data_set()
-{
- TCase *tcase = tcase_create("utc_evas_object_data_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_evas_object_data_set_p);
- tcase_add_test(tcase, utc_evas_object_data_set_n);
- return tcase;
-}