utc_eina_array_accessor_new.c
utc_eina_array_clean.c
utc_eina_array_count.c
-utc_eina_array_data_get.c
-utc_eina_array_data_set.c
+utc_eina_array_data_get_set.c
utc_eina_array_foreach.c
utc_eina_array_grow.c
utc_eina_array_pop.c
utc_eina_array_accessor_new.c
utc_eina_array_clean.c
utc_eina_array_count.c
-utc_eina_array_data_get.c
-utc_eina_array_data_set.c
+utc_eina_array_data_get_set.c
utc_eina_array_foreach.c
utc_eina_array_grow.c
utc_eina_array_pop.c
utc_eina_array_accessor_new.c
utc_eina_array_clean.c
utc_eina_array_count.c
-utc_eina_array_data_get.c
-utc_eina_array_data_set.c
+utc_eina_array_data_get_set.c
utc_eina_array_foreach.c
#utc_eina_array_grow.c
utc_eina_array_pop.c
utc_eina_array_accessor_new.c
utc_eina_array_clean.c
utc_eina_array_count.c
-utc_eina_array_data_get.c
-utc_eina_array_data_set.c
+utc_eina_array_data_get_set.c
utc_eina_array_foreach.c
#utc_eina_array_grow.c
utc_eina_array_pop.c
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-#include "../utc_eina_common.h"
-
-#define ARRAY_SIZE 10
-
-/**
- * @addtogroup eina_array
- * @{
- * @defgroup eina_array_data_get eina_array_data_get()
- *
- * @precondition
- * @step 1 Init the Eina library.
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_EINA_INIT();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_array_data_get
- * @{
- * @objective Positive test case 01: To retrieve the element at a given position in the array
- * @n Input data:
- * @ li arr The array to get data
- * @ li i The array index
- *
- * @procedure
- * @step 1 Create a new array
- * @step 2 Make a loop for pushing
- * @step 3 Push some data to the array
- * @step 4 Compare array data
- *
- * @passcondition: Given data is valid
- * @}
- */
-START_TEST(utc_eina_array_data_get_p_1)
-{
- const char* strs[] = { "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten" };
- unsigned int i;
-
- Eina_Array* arr = eina_array_new(ARRAY_SIZE);
- if ( arr == NULL )
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- for ( i = 0; i < ARRAY_SIZE; ++i )
- {
- eina_array_push(arr, strs[i]);
- if ( strcmp(eina_array_data_get(arr, i), strs[i]) )
- {
- eina_array_free(arr);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- }
-
- eina_array_free(arr);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup eina_array_data_get
- * @{
- * @objective Positive test case 02: To retrieve the element at a given position in the array
- * @n Input data:
- * @ li arr The array to get data
- * @ li i The array index
- *
- * @procedure
- * @step 1 Create a new array
- * @step 2 Push char data type to the array
- * @step 3 Compare data type
- * @step 4 Push float data type to the array
- * @step 5 Compare data type
- * @step 6 Push int data type to the array
- * @step 7 Compare data type
- * @step 8 Compare array size
- *
- * @passcondition: Data types are added successfully, array count is correct
- * @}
- */
-START_TEST(utc_eina_array_data_get_p_2)
-{
- const char* strs[] = { "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten" };
- unsigned int i = 10;
- float f = 22.45;
-
- Eina_Array* arr = eina_array_new(ARRAY_SIZE);
- if ( arr == NULL )
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- eina_array_push(arr, strs[0]);
- if ( strcmp(eina_array_data_get(arr, 0), strs[0]) )
- {
- eina_array_free(arr);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- eina_array_push(arr, &f);
- if ( *(float* )(eina_array_data_get(arr, 1)) != f )
- {
- eina_array_free(arr);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- eina_array_push(arr, &i);
- if ( *(int* )(eina_array_data_get(arr, 2)) != i )
- {
- eina_array_free(arr);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- if ( eina_array_count(arr) == 3 )
- {
- eina_array_free(arr);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
- }
-
- eina_array_free(arr);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_eina_array_data_get()
-{
- TCase *tcase = tcase_create("utc_eina_array_data_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_array_data_get_p_1);
- tcase_add_test(tcase, utc_eina_array_data_get_p_2);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Eina.h>
+#include "../utc_eina_common.h"
+
+#define ARRAY_SIZE 10
+
+/**
+ * @addtogroup eina_array
+ * @{
+ * @defgroup eina_array_data_set eina_array_data_set()
+ *
+ * @precondition
+ * @step 1 Init the Eina library.
+ */
+
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_EINA_INIT();
+}
+
+static void
+teardown(void)
+{
+ printf(" ============ Cleanup ============ \n");
+ eina_shutdown();
+}
+
+/**
+ * @addtogroup eina_array_data_set
+ * @{
+ * @objective Positive test case 01: set the data at a given position in an array
+ * @n Input data:
+ * @ li arr The array to set data
+ * @ li i The array index
+ * @ li strsData The data to set
+ *
+ * @procedure
+ * @step 1 Create a new array
+ * @step 2 Make a loop for pushing
+ * @step 3 Set some data to the array
+ * @step 4 Compare array data
+ *
+ * @passcondition: Given data is valid
+ * @}
+ */
+START_TEST(utc_eina_array_data_set_p_1)
+{
+ const char* strsData[] = { "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten" };
+ unsigned int i;
+
+ Eina_Array* arr = eina_array_new(ARRAY_SIZE);
+ if ( arr == NULL )
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ for (i = 0; i < ARRAY_SIZE; i++)
+ {
+ eina_array_push(arr, strsData[0]);
+ }
+
+ for ( i = 0; i < ARRAY_SIZE; ++i )
+ {
+ eina_array_data_set(arr, i, strsData[i]);
+ if ( strcmp(eina_array_data_get(arr, i), strsData[i]) )
+ {
+ eina_array_free(arr);
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ }
+ eina_array_free(arr);
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup eina_array_data_set
+ * @{
+ * @objective Positive test case 02: set the data at a given position in an array
+ * @n Input data:
+ * @ li arr The array to set data
+ * @ li i The array index
+ * @ li strsData The data to set
+ *
+ * @procedure
+ * @step 1 Create a new array
+ * @step 2 Set char data type to the array
+ * @step 3 Compare data type
+ * @step 4 Set float data type to the array
+ * @step 5 Compare data type
+ * @step 6 Set int data type to the array
+ * @step 7 Compare data type
+ * @step 8 Compare array size
+ *
+ * @passcondition: Data types are set successfully, array count is correct
+ * @}
+ */
+START_TEST(utc_eina_array_data_set_p_2)
+{
+ const char* strsData[] = { "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten" };
+ unsigned int i = 10;
+ float f = 22.45;
+
+ Eina_Array* arr = eina_array_new(ARRAY_SIZE);
+ if ( arr == NULL )
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ for (i = 0; i < 3; i++)
+ {
+ eina_array_push(arr, strsData[0]);
+ }
+
+ eina_array_data_set(arr, 0, strsData[0]);
+ if ( strcmp(eina_array_data_get(arr, 0), strsData[0]) )
+ {
+ eina_array_free(arr);
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ eina_array_data_set(arr, 1, &f);
+ if ( *(float* )(eina_array_data_get(arr, 1)) != f )
+ {
+ eina_array_free(arr);
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ eina_array_data_set(arr, 2, &i);
+ if ( *(int* )(eina_array_data_get(arr, 2)) != i )
+ {
+ eina_array_free(arr);
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ if ( eina_array_count(arr) == 3 )
+ {
+ eina_array_free(arr);
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+ }
+
+ eina_array_free(arr);
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup eina_array_data_get
+ * @{
+ * @objective Positive test case 02: To retrieve the element at a given position in the array
+ * @n Input data:
+ * @ li arr The array to get data
+ * @ li i The array index
+ *
+ * @procedure
+ * @step 1 Create a new array
+ * @step 2 Push char data type to the array
+ * @step 3 Compare data type
+ * @step 4 Push float data type to the array
+ * @step 5 Compare data type
+ * @step 6 Push int data type to the array
+ * @step 7 Compare data type
+ * @step 8 Compare array size
+ *
+ * @passcondition: Data types are added successfully, array count is correct
+ * @}
+ */
+START_TEST(utc_eina_array_data_get_p_2)
+{
+ const char* strs[] = { "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten" };
+ unsigned int i = 10;
+ float f = 22.45;
+
+ Eina_Array* arr = eina_array_new(ARRAY_SIZE);
+ if ( arr == NULL )
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ eina_array_push(arr, strs[0]);
+ if ( strcmp(eina_array_data_get(arr, 0), strs[0]) )
+ {
+ eina_array_free(arr);
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ eina_array_push(arr, &f);
+ if ( *(float* )(eina_array_data_get(arr, 1)) != f )
+ {
+ eina_array_free(arr);
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ eina_array_push(arr, &i);
+ if ( *(int* )(eina_array_data_get(arr, 2)) != i )
+ {
+ eina_array_free(arr);
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ if ( eina_array_count(arr) == 3 )
+ {
+ eina_array_free(arr);
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+ }
+
+ eina_array_free(arr);
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_eina_array_data_get_set()
+{
+ TCase *tcase = tcase_create("utc_eina_array_data_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_eina_array_data_set_p_1);
+ tcase_add_test(tcase, utc_eina_array_data_set_p_2);
+ tcase_add_test(tcase, utc_eina_array_data_get_p_2);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-#include "../utc_eina_common.h"
-
-#define ARRAY_SIZE 10
-
-/**
- * @addtogroup eina_array
- * @{
- * @defgroup eina_array_data_set eina_array_data_set()
- *
- * @precondition
- * @step 1 Init the Eina library.
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_EINA_INIT();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_array_data_set
- * @{
- * @objective Positive test case 01: set the data at a given position in an array
- * @n Input data:
- * @ li arr The array to set data
- * @ li i The array index
- * @ li strsData The data to set
- *
- * @procedure
- * @step 1 Create a new array
- * @step 2 Make a loop for pushing
- * @step 3 Set some data to the array
- * @step 4 Compare array data
- *
- * @passcondition: Given data is valid
- * @}
- */
-START_TEST(utc_eina_array_data_set_p_1)
-{
- const char* strsData[] = { "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten" };
- unsigned int i;
-
- Eina_Array* arr = eina_array_new(ARRAY_SIZE);
- if ( arr == NULL )
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- for (i = 0; i < ARRAY_SIZE; i++)
- {
- eina_array_push(arr, strsData[0]);
- }
-
- for ( i = 0; i < ARRAY_SIZE; ++i )
- {
- eina_array_data_set(arr, i, strsData[i]);
- if ( strcmp(eina_array_data_get(arr, i), strsData[i]) )
- {
- eina_array_free(arr);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- }
- eina_array_free(arr);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup eina_array_data_set
- * @{
- * @objective Positive test case 02: set the data at a given position in an array
- * @n Input data:
- * @ li arr The array to set data
- * @ li i The array index
- * @ li strsData The data to set
- *
- * @procedure
- * @step 1 Create a new array
- * @step 2 Set char data type to the array
- * @step 3 Compare data type
- * @step 4 Set float data type to the array
- * @step 5 Compare data type
- * @step 6 Set int data type to the array
- * @step 7 Compare data type
- * @step 8 Compare array size
- *
- * @passcondition: Data types are set successfully, array count is correct
- * @}
- */
-START_TEST(utc_eina_array_data_set_p_2)
-{
- const char* strsData[] = { "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten" };
- unsigned int i = 10;
- float f = 22.45;
-
- Eina_Array* arr = eina_array_new(ARRAY_SIZE);
- if ( arr == NULL )
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- for (i = 0; i < 3; i++)
- {
- eina_array_push(arr, strsData[0]);
- }
-
- eina_array_data_set(arr, 0, strsData[0]);
- if ( strcmp(eina_array_data_get(arr, 0), strsData[0]) )
- {
- eina_array_free(arr);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- eina_array_data_set(arr, 1, &f);
- if ( *(float* )(eina_array_data_get(arr, 1)) != f )
- {
- eina_array_free(arr);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- eina_array_data_set(arr, 2, &i);
- if ( *(int* )(eina_array_data_get(arr, 2)) != i )
- {
- eina_array_free(arr);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- if ( eina_array_count(arr) == 3 )
- {
- eina_array_free(arr);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
- }
-
- eina_array_free(arr);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_eina_array_data_set()
-{
- TCase *tcase = tcase_create("utc_eina_array_data_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_array_data_set_p_1);
- tcase_add_test(tcase, utc_eina_array_data_set_p_2);
- return tcase;
-}
utc_eina_error_find.c
-utc_eina_error_get.c
+utc_eina_error_get_set.c
utc_eina_error_msg_modify.c
utc_eina_error_msg_register.c
utc_eina_error_msg_static_register.c
utc_eina_error_msg_get.c
-utc_eina_error_set.c
utc_eina_error_find.c
-utc_eina_error_get.c
+utc_eina_error_get_set.c
utc_eina_error_msg_modify.c
utc_eina_error_msg_register.c
utc_eina_error_msg_static_register.c
utc_eina_error_msg_get.c
-utc_eina_error_set.c
utc_eina_error_find.c
-utc_eina_error_get.c
+utc_eina_error_get_set.c
utc_eina_error_msg_modify.c
utc_eina_error_msg_register.c
utc_eina_error_msg_static_register.c
utc_eina_error_msg_get.c
-utc_eina_error_set.c
utc_eina_error_find.c
-utc_eina_error_get.c
+utc_eina_error_get_set.c
utc_eina_error_msg_modify.c
utc_eina_error_msg_register.c
utc_eina_error_msg_static_register.c
utc_eina_error_msg_get.c
-utc_eina_error_set.c
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-#include "../utc_eina_common.h"
-
-/**
- * @addtogroup eina_error
- * @{
- * @defgroup eina_error_get eina_error_get()
- *
- *
- * @precondition
- * @step 1 Initialize eina library with eina_init()
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_EINA_INIT();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_error_get
- * @{
- * @objective Positive test case 01 checks if function returns proper last error identifier.
- * @n Input Data: function has no arguments.
- *
- * @procedure
- * @step 1 Register new error type with text "test"
- * @step 2 Set the error
- * @step 3 Get the error
- *
- * @passcondition Function returns last error properly, set and got values of the error are equals.
- * @}
- */
-START_TEST(utc_eina_error_get_p)
-{
- Eina_Error error = eina_error_msg_static_register("test");
-
- if (error <= 0)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. New Eina_Error is not registered..", __FILE__, __LINE__);
- }
- eina_error_set(error);
-
- if (eina_error_get() != error)
- {
- 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 eina_error_get
- * @{
- * @objective Positive test case 02 checks if function returns any number (but not NULL and there wasn't any errors previously).
- * @n Input Data: function has no arguments.
- *
- * @procedure
- * @step 1 Get the error
- *
- * @passcondition Function returns NULL.
- * @}
- */
-START_TEST(utc_eina_error_get_p2)
-{
- if (eina_error_get() != 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_eina_error_get()
-{
- TCase *tcase = tcase_create("utc_eina_error_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_error_get_p);
- tcase_add_test(tcase, utc_eina_error_get_p2);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Eina.h>
+#include "../utc_eina_common.h"
+
+/**
+ * @addtogroup eina_error
+ * @{
+ * @defgroup eina_error_set eina_error_set()
+ *
+ *
+ * @precondition
+ * @step 1 Initialize eina library with eina_init()
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_EINA_INIT();
+}
+
+static void
+teardown(void)
+{
+ printf(" ============ Cleanup ============ \n");
+ eina_shutdown();
+}
+
+/**
+ * @addtogroup eina_error_set
+ * @{
+ * @objective Positive test case 01 checks if function sets the last error identifier properly.
+ * @n Input Data: registered error number.
+ *
+ * @procedure
+ * @step 1 Register new error type with text "test"
+ * @step 2 Set the error
+ * @step 3 Get the error
+ *
+ * @passcondition Function sets last error properly, set and got values of the error are equals.
+ * @}
+ */
+START_TEST(utc_eina_error_set_p)
+{
+ Eina_Error error = eina_error_msg_static_register("test");
+
+ if (error <= 0)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. New Eina_Error is not registered..", __FILE__, __LINE__);
+ }
+ eina_error_set(error);
+
+ if (eina_error_get() != error)
+ {
+ 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 eina_error_set
+ * @{
+ * @objective Positive test case 02 checks if function sets the last error identifier properly.
+ * @n Input Data: registered error number.
+ *
+ * @procedure
+ * @step 1 Set the error that is less than 0
+ * @step 2 Get the error
+ *
+ * @passcondition Function sets last error properly, set and got values of the error are equals.
+ * @}
+ */
+START_TEST(utc_eina_error_set_p2)
+{
+ Eina_Error error = -563;
+
+ eina_error_set(error);
+
+ if (eina_error_get() != error)
+ {
+ 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 eina_error_set
+ * @{
+ * @objective Positive test case 03 checks if function sets the last error identifier properly.
+ * @n Input Data: registered error number.
+ *
+ * @procedure
+ * @step 1 Set the error that is equal 0
+ * @step 2 Get the error
+ *
+ * @passcondition Function sets last error properly, set and got values of the error are equals.
+ * @}
+ */
+START_TEST(utc_eina_error_set_p3)
+{
+ Eina_Error error = 0;
+
+ eina_error_set(error);
+
+ if (eina_error_get() != error)
+ {
+ 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 eina_error_get
+ * @{
+ * @objective Positive test case 02 checks if function returns any number (but not NULL and there wasn't any errors previously).
+ * @n Input Data: function has no arguments.
+ *
+ * @procedure
+ * @step 1 Get the error
+ *
+ * @passcondition Function returns NULL.
+ * @}
+ */
+START_TEST(utc_eina_error_get_p2)
+{
+ if (eina_error_get() != 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_eina_error_get_set()
+{
+ TCase *tcase = tcase_create("utc_eina_error_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_eina_error_set_p);
+ tcase_add_test(tcase, utc_eina_error_set_p2);
+ tcase_add_test(tcase, utc_eina_error_set_p3);
+ tcase_add_test(tcase, utc_eina_error_get_p2);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-#include "../utc_eina_common.h"
-
-/**
- * @addtogroup eina_error
- * @{
- * @defgroup eina_error_set eina_error_set()
- *
- *
- * @precondition
- * @step 1 Initialize eina library with eina_init()
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_EINA_INIT();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_error_set
- * @{
- * @objective Positive test case 01 checks if function sets the last error identifier properly.
- * @n Input Data: registered error number.
- *
- * @procedure
- * @step 1 Register new error type with text "test"
- * @step 2 Set the error
- * @step 3 Get the error
- *
- * @passcondition Function sets last error properly, set and got values of the error are equals.
- * @}
- */
-START_TEST(utc_eina_error_set_p)
-{
- Eina_Error error = eina_error_msg_static_register("test");
-
- if (error <= 0)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. New Eina_Error is not registered..", __FILE__, __LINE__);
- }
- eina_error_set(error);
-
- if (eina_error_get() != error)
- {
- 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 eina_error_set
- * @{
- * @objective Positive test case 02 checks if function sets the last error identifier properly.
- * @n Input Data: registered error number.
- *
- * @procedure
- * @step 1 Set the error that is less than 0
- * @step 2 Get the error
- *
- * @passcondition Function sets last error properly, set and got values of the error are equals.
- * @}
- */
-START_TEST(utc_eina_error_set_p2)
-{
- Eina_Error error = -563;
-
- eina_error_set(error);
-
- if (eina_error_get() != error)
- {
- 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 eina_error_set
- * @{
- * @objective Positive test case 03 checks if function sets the last error identifier properly.
- * @n Input Data: registered error number.
- *
- * @procedure
- * @step 1 Set the error that is equal 0
- * @step 2 Get the error
- *
- * @passcondition Function sets last error properly, set and got values of the error are equals.
- * @}
- */
-START_TEST(utc_eina_error_set_p3)
-{
- Eina_Error error = 0;
-
- eina_error_set(error);
-
- if (eina_error_get() != error)
- {
- 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_eina_error_set()
-{
- TCase *tcase = tcase_create("utc_eina_error_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_error_set_p);
- tcase_add_test(tcase, utc_eina_error_set_p2);
- tcase_add_test(tcase, utc_eina_error_set_p3);
- return tcase;
-}
utc_eina_log_domain_register.c
utc_eina_log_domain_unregister.c
-utc_eina_log_domain_level_set.c
-utc_eina_log_domain_level_get.c
-utc_eina_log_level_get.c
-utc_eina_log_level_set.c
+utc_eina_log_domain_level_get_set.c
+utc_eina_log_level_get_set.c
utc_eina_log_print.c
utc_eina_log_threads_enable.c
utc_eina_log_print_cb_set.c
utc_eina_log_domain_register.c
utc_eina_log_domain_unregister.c
-utc_eina_log_domain_level_set.c
-utc_eina_log_domain_level_get.c
-utc_eina_log_level_get.c
-utc_eina_log_level_set.c
+utc_eina_log_domain_level_get_set.c
+utc_eina_log_level_get_set.c
utc_eina_log_print.c
utc_eina_log_threads_enable.c
utc_eina_log_print_cb_set.c
utc_eina_log_domain_register.c
utc_eina_log_domain_unregister.c
-utc_eina_log_domain_level_set.c
-utc_eina_log_domain_level_get.c
-utc_eina_log_level_get.c
-utc_eina_log_level_set.c
+utc_eina_log_domain_level_get_set.c
+utc_eina_log_level_get_set.c
utc_eina_log_print.c
utc_eina_log_threads_enable.c
utc_eina_log_print_cb_set.c
utc_eina_log_domain_register.c
utc_eina_log_domain_unregister.c
-utc_eina_log_domain_level_set.c
-utc_eina_log_domain_level_get.c
-utc_eina_log_level_get.c
-utc_eina_log_level_set.c
+utc_eina_log_domain_level_get_set.c
+utc_eina_log_level_get_set.c
utc_eina_log_print.c
utc_eina_log_threads_enable.c
utc_eina_log_print_cb_set.c
utc_eina_log_abort_on_critical_set.c
utc_eina_log_abort_on_critical_get.c
utc_eina_log_domain_registered_level_get.c
-#utc_eina_log_print_cb_file.c
+utc_eina_log_print_cb_file.c
#utc_eina_log_abort_on_critical_level_set_get.c
#utc_eina_log_color_disable_set_get.c
#utc_eina_log_file_disable_set_get.c
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-#include "../utc_eina_common.h"
-#include "../../utc_negative_unitest.h"
-
-/**
- * @addtogroup eina_log
- * @{
- * @defgroup eina_log_domain_level_get eina_log_domain_level_get()
- *
- *
- * @precondition
- * @step 1 Initialize eina library with eina_init()
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_EINA_INIT();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_log_domain_level_get
- * @{
- * @objective Positive test case checks if function returns the domain level properly.
- * @n Input Data: "DOMAIN" as domain name.
- *
- * @procedure
- * @step 1 Register new domain with name "DOMAIN"
- * @step 2 Set the domain log level to EINA_LOG_LEVEL_WARN
- * @step 3 Get the domain log level and compare with set value
- *
- * @passcondition Function returns the domain log level properly.
- * @}
- */
-START_TEST(utc_eina_log_domain_level_get_p)
-{
- int level = EINA_LOG_LEVEL_UNKNOWN;
- const char *domain = "DOMAIN";
- int dnum = eina_log_domain_register(domain, EINA_COLOR_RED);
-
- if (dnum < 0)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Log domain is not registered..", __FILE__, __LINE__);
- }
- eina_log_domain_level_set(domain, EINA_LOG_LEVEL_WARN);
- level = eina_log_domain_level_get(domain);
- eina_log_domain_unregister(dnum);
-
- if (level != EINA_LOG_LEVEL_WARN)
- {
- 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 eina_log_domain_level_get
- * @{
- * @objective Negative test case 1 checks if function doesn't cause segmentation fault
- * and returns EINA_LOG_LEVEL_UNKNOWN if it is called with NULL instead of domain name.
- * @n Input Data: NULL as domain name.
- *
- * @procedure
- * @step 1 Call function and pass NULL instead of its argument.
- *
- * @passcondition Function doesn't cause segmentation fault and returns EINA_LOG_LEVEL_UNKNOWN.
- * @}
- */
-START_TEST(utc_eina_log_domain_level_get_n)
-{
-
- if (UNITEST_FUNC_NEG_RET(EINA_LOG_LEVEL_UNKNOWN, eina_log_domain_level_get, NULL) == TEST_FAIL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup eina_log_domain_level_get
- * @{
- * @objective Negative test case 2 checks if function doesn't cause segmentation fault
- * and returns the default global log level if it is called with inexistent domain name (unregistered domain).
- * @n Input Data: "not existent domain name" as inexistent domain name.
- *
- * @procedure
- * @step 1 Call function and pass unregistered domain name
- * @step 2 Get default global log level
- * @step 3 Compare these values
- *
- * @passcondition Values got on step 1 and 2 must be equal.
- * @}
- */
-START_TEST(utc_eina_log_domain_level_get_n2)
-{
- int result = eina_log_domain_level_get("not existent domain name");
- int deflevel = eina_log_level_get();
-
- if (result != deflevel)
- {
- 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_eina_log_domain_level_get()
-{
- TCase *tcase = tcase_create("utc_eina_log_domain_level_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_log_domain_level_get_p);
- tcase_add_test(tcase, utc_eina_log_domain_level_get_n);
- tcase_add_test(tcase, utc_eina_log_domain_level_get_n2);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Eina.h>
+#include "../utc_eina_common.h"
+#include "../../utc_negative_unitest.h"
+
+/**
+ * @addtogroup eina_log
+ * @{
+ * @defgroup eina_log_domain_level_get eina_log_domain_level_get()
+ *
+ *
+ * @precondition
+ * @step 1 Initialize eina library with eina_init()
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_EINA_INIT();
+}
+
+static void
+teardown(void)
+{
+ printf(" ============ Cleanup ============ \n");
+ eina_shutdown();
+}
+
+/**
+ * @addtogroup eina_log_domain_level_get
+ * @{
+ * @objective Positive test case checks if function returns the domain level properly.
+ * @n Input Data: "DOMAIN" as domain name.
+ *
+ * @procedure
+ * @step 1 Register new domain with name "DOMAIN"
+ * @step 2 Set the domain log level to EINA_LOG_LEVEL_WARN
+ * @step 3 Get the domain log level and compare with set value
+ *
+ * @passcondition Function returns the domain log level properly.
+ * @}
+ */
+START_TEST(utc_eina_log_domain_level_get_p)
+{
+ int level = EINA_LOG_LEVEL_UNKNOWN;
+ const char *domain = "DOMAIN";
+ int dnum = eina_log_domain_register(domain, EINA_COLOR_RED);
+
+ if (dnum < 0)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Log domain is not registered..", __FILE__, __LINE__);
+ }
+ eina_log_domain_level_set(domain, EINA_LOG_LEVEL_WARN);
+ level = eina_log_domain_level_get(domain);
+ eina_log_domain_unregister(dnum);
+
+ if (level != EINA_LOG_LEVEL_WARN)
+ {
+ 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 eina_log_domain_level_get
+ * @{
+ * @objective Negative test case 1 checks if function doesn't cause segmentation fault
+ * and returns EINA_LOG_LEVEL_UNKNOWN if it is called with NULL instead of domain name.
+ * @n Input Data: NULL as domain name.
+ *
+ * @procedure
+ * @step 1 Call function and pass NULL instead of its argument.
+ *
+ * @passcondition Function doesn't cause segmentation fault and returns EINA_LOG_LEVEL_UNKNOWN.
+ * @}
+ */
+START_TEST(utc_eina_log_domain_level_get_n)
+{
+
+ if (UNITEST_FUNC_NEG_RET(EINA_LOG_LEVEL_UNKNOWN, eina_log_domain_level_get, NULL) == TEST_FAIL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup eina_log_domain_level_get
+ * @{
+ * @objective Negative test case 2 checks if function doesn't cause segmentation fault
+ * and returns the default global log level if it is called with inexistent domain name (unregistered domain).
+ * @n Input Data: "not existent domain name" as inexistent domain name.
+ *
+ * @procedure
+ * @step 1 Call function and pass unregistered domain name
+ * @step 2 Get default global log level
+ * @step 3 Compare these values
+ *
+ * @passcondition Values got on step 1 and 2 must be equal.
+ * @}
+ */
+START_TEST(utc_eina_log_domain_level_get_n2)
+{
+ int result = eina_log_domain_level_get("not existent domain name");
+ int deflevel = eina_log_level_get();
+
+ if (result != deflevel)
+ {
+ 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 eina_log_domain_level_set
+ * @{
+ * @objective Negative test 01 case checks if function doesn't cause segmentation fault
+ * if it is called with NULL instead of domain name.
+ * @n Input Data:
+ * @li NULL as domain name
+ * @li EINA_LOG_LEVEL_DBG as domain log level.
+ *
+ * @procedure
+ * @step 1 Call function and pass NULL instead of its first argument.
+ *
+ * @passcondition Function doesn't cause segmentation fault.
+ * @}
+ */
+START_TEST(utc_eina_log_domain_level_set_n)
+{
+
+ eina_log_domain_level_set(NULL, EINA_LOG_LEVEL_DBG);
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup eina_log_domain_level_set
+ * @{
+ * @objective Negative test 02 case checks if function doesn't cause segmentation fault
+ * if it is called with -3 as a domain log level.
+ * @n Input Data:
+ * @li "DOMAIN" as domain name
+ * @li -3 as domain log level.
+ *
+ * @procedure
+ * @step 1 Call function and pass NULL instead of its first argument.
+ *
+ * @passcondition Function doesn't cause segmentation fault.
+ * @}
+ */
+START_TEST(utc_eina_log_domain_level_set_n2)
+{
+
+ const char *domain = "DOMAIN";
+
+ eina_log_domain_level_set(domain, -3);
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_eina_log_domain_level_get_set()
+{
+ TCase *tcase = tcase_create("utc_eina_log_domain_level_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_eina_log_domain_level_get_p);
+ tcase_add_test(tcase, utc_eina_log_domain_level_get_n);
+ tcase_add_test(tcase, utc_eina_log_domain_level_get_n2);
+ tcase_add_test(tcase, utc_eina_log_domain_level_set_n);
+ tcase_add_test(tcase, utc_eina_log_domain_level_set_n2);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-#include "../utc_eina_common.h"
-#include "../../utc_negative_unitest.h"
-
-/**
- * @addtogroup eina_log
- * @{
- * @defgroup eina_log_domain_level_set eina_log_domain_level_set()
- *
- *
- * @precondition
- * @step 1 Initialize eina library with eina_init()
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_EINA_INIT();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_log_domain_level_set
- * @{
- * @objective Positive test case checks if function sets the domain level properly.
- * @n Input Data:
- * @li "DOMAIN" as domain name;
- * @li EINA_LOG_LEVEL_WARN as domain log level.
- *
- * @procedure
- * @step 1 Register new domain with name "DOMAIN"
- * @step 2 Set the domain log level to EINA_LOG_LEVEL_WARN
- * @step 3 Get the domain log level and compare with set value
- *
- * @passcondition Function sets the domain log level properly.
- * @}
- */
-START_TEST(utc_eina_log_domain_level_set_p)
-{
- int level = EINA_LOG_LEVEL_UNKNOWN;
- const char *domain = "DOMAIN";
- int dnum = eina_log_domain_register(domain, EINA_COLOR_RED);
-
- if (dnum < 0)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Log domain is not registered..", __FILE__, __LINE__);
- }
- eina_log_domain_level_set(domain, EINA_LOG_LEVEL_WARN);
- level = eina_log_domain_level_get(domain);
- eina_log_domain_unregister(dnum);
-
- if (level != EINA_LOG_LEVEL_WARN)
- {
- 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 eina_log_domain_level_set
- * @{
- * @objective Negative test 01 case checks if function doesn't cause segmentation fault
- * if it is called with NULL instead of domain name.
- * @n Input Data:
- * @li NULL as domain name
- * @li EINA_LOG_LEVEL_DBG as domain log level.
- *
- * @procedure
- * @step 1 Call function and pass NULL instead of its first argument.
- *
- * @passcondition Function doesn't cause segmentation fault.
- * @}
- */
-START_TEST(utc_eina_log_domain_level_set_n)
-{
-
- eina_log_domain_level_set(NULL, EINA_LOG_LEVEL_DBG);
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup eina_log_domain_level_set
- * @{
- * @objective Negative test 02 case checks if function doesn't cause segmentation fault
- * if it is called with -3 as a domain log level.
- * @n Input Data:
- * @li "DOMAIN" as domain name
- * @li -3 as domain log level.
- *
- * @procedure
- * @step 1 Call function and pass NULL instead of its first argument.
- *
- * @passcondition Function doesn't cause segmentation fault.
- * @}
- */
-START_TEST(utc_eina_log_domain_level_set_n2)
-{
-
- const char *domain = "DOMAIN";
-
- eina_log_domain_level_set(domain, -3);
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-/**
- *@}
- */
-
-TCase * _utc_eina_log_domain_level_set()
-{
- TCase *tcase = tcase_create("utc_eina_log_domain_level_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_log_domain_level_set_p);
- tcase_add_test(tcase, utc_eina_log_domain_level_set_n);
- tcase_add_test(tcase, utc_eina_log_domain_level_set_n2);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-#include "../utc_eina_common.h"
-
-/**
- * @addtogroup eina_log
- * @{
- * @defgroup eina_log_level_get eina_log_level_get()
- *
- *
- * @precondition
- * @step 1 Initialize eina library with eina_init()
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_EINA_INIT();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_log_level_get
- * @{
- * @objective Positive test case checks if function returns the default log level properly.
- * @n Input Data: function has no arguments.
- *
- * @procedure
- * @step 1 Set the default log level to EINA_LOG_LEVEL_WARN
- * @step 2 Get the default log level and compare with set value
- *
- * @passcondition Function returns the default log level properly.
- * @}
- */
-START_TEST(utc_eina_log_level_get_p)
-{
- int level = EINA_LOG_LEVEL_UNKNOWN;
-
- eina_log_level_set(EINA_LOG_LEVEL_WARN);
- level = eina_log_level_get();
-
- if (level != EINA_LOG_LEVEL_WARN)
- {
- 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_eina_log_level_get()
-{
- TCase *tcase = tcase_create("utc_eina_log_level_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_log_level_get_p);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Eina.h>
+#include "../utc_eina_common.h"
+
+/**
+ * @addtogroup eina_log
+ * @{
+ * @defgroup eina_log_level_set eina_log_level_set()
+ *
+ *
+ * @precondition
+ * @step 1 Initialize eina library with eina_init()
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_EINA_INIT();
+}
+
+static void
+teardown(void)
+{
+ printf(" ============ Cleanup ============ \n");
+ eina_shutdown();
+}
+
+/**
+ * @addtogroup eina_log_level_set
+ * @{
+ * @objective Positive test 01 case checks if function sets the default log level properly.
+ * @n Input Data:
+ * @li EINA_LOG_LEVEL_WARN as log level.
+ *
+ * @procedure
+ * @step 1 Set the default log level to EINA_LOG_LEVEL_WARN
+ * @step 2 Get the default log level and compare with set value
+ * @step 3 Set the default log level to EINA_LOG_LEVEL_CRITICAL
+ * @step 4 Get the default log level and compare with set value
+ *
+ * @passcondition Function sets the default log level properly.
+ * @}
+ */
+START_TEST(utc_eina_log_level_set_p)
+{
+ int level = EINA_LOG_LEVEL_UNKNOWN;
+
+ eina_log_level_set(EINA_LOG_LEVEL_WARN);
+ level = eina_log_level_get();
+
+ if (level != EINA_LOG_LEVEL_WARN)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ eina_log_level_set(EINA_LOG_LEVEL_CRITICAL);
+ level = eina_log_level_get();
+
+ if (level != EINA_LOG_LEVEL_CRITICAL)
+ {
+ 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 eina_log_level_set
+ * @{
+ * @objective Positive test 02 case checks if function sets the default log level properly.
+ * @n Input Data:
+ * @li EINA_LOG_LEVEL_WARN as log level.
+ *
+ * @procedure
+ * @step 1 Set the default log level to 0
+ * @step 2 Get the default log level and compare with set value
+ * @step 3 Set the default log level to -666
+ * @step 4 Get the default log level and compare with set value
+ *
+ * @passcondition Function sets the default log level properly.
+ * @}
+ */
+START_TEST(utc_eina_log_level_set_p2)
+{
+ int level = EINA_LOG_LEVEL_UNKNOWN;
+
+ eina_log_level_set(0);
+ level = eina_log_level_get();
+
+ if (level != 0)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ eina_log_level_set(-666);
+ level = eina_log_level_get();
+
+ if (level != -666)
+ {
+ 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_eina_log_level_get_set()
+{
+ TCase *tcase = tcase_create("utc_eina_log_level_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_eina_log_level_set_p);
+ tcase_add_test(tcase, utc_eina_log_level_set_p2);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-#include "../utc_eina_common.h"
-
-/**
- * @addtogroup eina_log
- * @{
- * @defgroup eina_log_level_set eina_log_level_set()
- *
- *
- * @precondition
- * @step 1 Initialize eina library with eina_init()
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_EINA_INIT();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_log_level_set
- * @{
- * @objective Positive test 01 case checks if function sets the default log level properly.
- * @n Input Data:
- * @li EINA_LOG_LEVEL_WARN as log level.
- *
- * @procedure
- * @step 1 Set the default log level to EINA_LOG_LEVEL_WARN
- * @step 2 Get the default log level and compare with set value
- * @step 3 Set the default log level to EINA_LOG_LEVEL_CRITICAL
- * @step 4 Get the default log level and compare with set value
- *
- * @passcondition Function sets the default log level properly.
- * @}
- */
-START_TEST(utc_eina_log_level_set_p)
-{
- int level = EINA_LOG_LEVEL_UNKNOWN;
-
- eina_log_level_set(EINA_LOG_LEVEL_WARN);
- level = eina_log_level_get();
-
- if (level != EINA_LOG_LEVEL_WARN)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- }
-
- eina_log_level_set(EINA_LOG_LEVEL_CRITICAL);
- level = eina_log_level_get();
-
- if (level != EINA_LOG_LEVEL_CRITICAL)
- {
- 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 eina_log_level_set
- * @{
- * @objective Positive test 02 case checks if function sets the default log level properly.
- * @n Input Data:
- * @li EINA_LOG_LEVEL_WARN as log level.
- *
- * @procedure
- * @step 1 Set the default log level to 0
- * @step 2 Get the default log level and compare with set value
- * @step 3 Set the default log level to -666
- * @step 4 Get the default log level and compare with set value
- *
- * @passcondition Function sets the default log level properly.
- * @}
- */
-START_TEST(utc_eina_log_level_set_p2)
-{
- int level = EINA_LOG_LEVEL_UNKNOWN;
-
- eina_log_level_set(0);
- level = eina_log_level_get();
-
- if (level != 0)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- }
-
- eina_log_level_set(-666);
- level = eina_log_level_get();
-
- if (level != -666)
- {
- 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_eina_log_level_set()
-{
- TCase *tcase = tcase_create("utc_eina_log_level_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_log_level_set_p);
- tcase_add_test(tcase, utc_eina_log_level_set_p2);
- return tcase;
-}
-utc_eina_magic_string_get.c
-utc_eina_magic_string_set.c
+utc_eina_magic_string_get_set.c
utc_eina_magic_string_static_set.c
utc_eina_magic_fail.c
-utc_eina_magic_string_get.c
-utc_eina_magic_string_set.c
+utc_eina_magic_string_get_set.c
utc_eina_magic_string_static_set.c
-utc_eina_magic_fail.c
+utc_eina_magic_fail.c
\ No newline at end of file
-utc_eina_magic_string_get.c
-utc_eina_magic_string_set.c
+utc_eina_magic_string_get_set.c
utc_eina_magic_string_static_set.c
-#utc_eina_magic_fail.c
+#utc_eina_magic_fail.c
\ No newline at end of file
-utc_eina_magic_string_get.c
-utc_eina_magic_string_set.c
+utc_eina_magic_string_get_set.c
utc_eina_magic_string_static_set.c
-#utc_eina_magic_fail.c
+#utc_eina_magic_fail.c
\ No newline at end of file
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-#include "../utc_eina_common.h"
-#include <eina_magic.h>
-#include <string.h>
-
-/**
- * @addtogroup eina_magic
- * @{
- * @defgroup eina_magic_string_get eina_magic_string_get()
- *
- *
- * @precondition
- * @step 1 Initialize eina library with eina_init()
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_EINA_INIT();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_magic_string_get
- * @{
- * @objective Positive test case checks if function returns string associated to the given magic identifier properly.
- * @n Input Data: 0x12345 as magic identifier.
- *
- * @procedure
- * @step 1 Set string associated to the magic identifier
- * @step 2 Call tested function and check returned value
- *
- * @passcondition Function returns the same value as was set.
- * @}
- */
-START_TEST(utc_eina_magic_string_get_p)
-{
- const char *src = "test";
- const Eina_Magic id = 0x12345;
-
- if (eina_magic_string_set(id, src) == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. String is not set..", __FILE__, __LINE__);
- }
- const char *str = eina_magic_string_get(id);
-
- if (!str || strcmp(str, src))
- {
- 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 eina_magic_string_get
- * @{
- * @objective Negative test case checks if function checks if function doesn't cause segmentation fault
- * and returns non-NULL value for magic identifier without any associated strings.
- * @n Input Data: 0 as magic identifier.
- *
- * @procedure
- * @step 1 Call tested function and check if returned value is not NULL
- *
- * @passcondition Function function doesn't cause segmentation fault and returns non-NULL value.
- * @}
- */
-START_TEST(utc_eina_magic_string_get_n)
-{
-
- if (!eina_magic_string_get(0))
- {
- 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_eina_magic_string_get()
-{
- TCase *tcase = tcase_create("utc_eina_magic_string_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_magic_string_get_p);
- tcase_add_test(tcase, utc_eina_magic_string_get_n);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Eina.h>
+#include "../utc_eina_common.h"
+#include <eina_magic.h>
+#include "../../utc_negative_unitest.h"
+#include <string.h>
+
+/**
+ * @addtogroup eina_magic
+ * @{
+ * @defgroup eina_magic_string_set eina_magic_string_set()
+ *
+ *
+ * @precondition
+ * @step 1 Initialize eina library with eina_init()
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_EINA_INIT();
+}
+
+static void
+teardown(void)
+{
+ printf(" ============ Cleanup ============ \n");
+ eina_shutdown();
+}
+
+/**
+ * @addtogroup eina_magic_string_set
+ * @{
+ * @objective Positive test case checks if function sets the string associated to the given magic identifier properly.
+ * @n Input Data:
+ * @li 0x12345 as magic identifier;
+ * @li "test" as string associated to the identifier.
+ *
+ * @procedure
+ * @step 1 Call tested function and check returned value
+ * @step 2 Get associated string and compare with set value
+ *
+ * @passcondition Function returns EINA_TRUE, set and got values are the same.
+ * @}
+ */
+START_TEST(utc_eina_magic_string_set_p)
+{
+ const char *src = "test";
+ const Eina_Magic id = 0x12345;
+
+ if (eina_magic_string_set(id, src) == EINA_FALSE)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Function has returned EINA_FALSE..", __FILE__, __LINE__);
+ }
+ const char *str = eina_magic_string_get(id);
+
+ if (!str || strcmp(str, src))
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Set and got strings are not equal..", __FILE__, __LINE__);
+ }
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup eina_magic_string_set
+ * @{
+ * @objective Negative test case checks if function doesn't cause segmentation fault
+ * and returns EINA_FALSE if it is called with NULL instead of associated string.
+ * @n Input Data:
+ * @li 0x12345 as magic identifier;
+ * @li NULL as string associated to the identifier.
+ *
+ * @procedure
+ * @step 1 Call function once and pass NULL instead of its second argument.
+ *
+ * @passcondition Function doesn't cause segmentation fault and returns EINA_FALSE.
+ * @}
+ */
+START_TEST(utc_eina_magic_string_set_n)
+{
+
+ CREATE_CHECKED_ARGS_ARRAY(0, 1);
+ UNITEST_FUNC_NEG_CA_RET(EINA_FALSE, eina_magic_string_set, 0x12345, NULL);
+
+ if (result_of_testing == TEST_FAIL)
+ 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 eina_magic_string_get
+ * @{
+ * @objective Negative test case checks if function checks if function doesn't cause segmentation fault
+ * and returns non-NULL value for magic identifier without any associated strings.
+ * @n Input Data: 0 as magic identifier.
+ *
+ * @procedure
+ * @step 1 Call tested function and check if returned value is not NULL
+ *
+ * @passcondition Function function doesn't cause segmentation fault and returns non-NULL value.
+ * @}
+ */
+START_TEST(utc_eina_magic_string_get_n)
+{
+
+ if (!eina_magic_string_get(0))
+ {
+ 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_eina_magic_string_get_set()
+{
+ TCase *tcase = tcase_create("utc_eina_magic_string_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_eina_magic_string_set_p);
+ tcase_add_test(tcase, utc_eina_magic_string_set_n);
+ tcase_add_test(tcase, utc_eina_magic_string_get_n);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-#include "../utc_eina_common.h"
-#include <eina_magic.h>
-#include "../../utc_negative_unitest.h"
-
-/**
- * @addtogroup eina_magic
- * @{
- * @defgroup eina_magic_string_set eina_magic_string_set()
- *
- *
- * @precondition
- * @step 1 Initialize eina library with eina_init()
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_EINA_INIT();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_magic_string_set
- * @{
- * @objective Positive test case checks if function sets the string associated to the given magic identifier properly.
- * @n Input Data:
- * @li 0x12345 as magic identifier;
- * @li "test" as string associated to the identifier.
- *
- * @procedure
- * @step 1 Call tested function and check returned value
- * @step 2 Get associated string and compare with set value
- *
- * @passcondition Function returns EINA_TRUE, set and got values are the same.
- * @}
- */
-START_TEST(utc_eina_magic_string_set_p)
-{
- const char *src = "test";
- const Eina_Magic id = 0x12345;
-
- if (eina_magic_string_set(id, src) == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Function has returned EINA_FALSE..", __FILE__, __LINE__);
- }
- const char *str = eina_magic_string_get(id);
-
- if (!str || strcmp(str, src))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Set and got strings are not equal..", __FILE__, __LINE__);
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup eina_magic_string_set
- * @{
- * @objective Negative test case checks if function doesn't cause segmentation fault
- * and returns EINA_FALSE if it is called with NULL instead of associated string.
- * @n Input Data:
- * @li 0x12345 as magic identifier;
- * @li NULL as string associated to the identifier.
- *
- * @procedure
- * @step 1 Call function once and pass NULL instead of its second argument.
- *
- * @passcondition Function doesn't cause segmentation fault and returns EINA_FALSE.
- * @}
- */
-START_TEST(utc_eina_magic_string_set_n)
-{
-
- CREATE_CHECKED_ARGS_ARRAY(0, 1);
- UNITEST_FUNC_NEG_CA_RET(EINA_FALSE, eina_magic_string_set, 0x12345, NULL);
-
- if (result_of_testing == TEST_FAIL)
- 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_eina_magic_string_set()
-{
- TCase *tcase = tcase_create("utc_eina_magic_string_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_magic_string_set_p);
- tcase_add_test(tcase, utc_eina_magic_string_set_n);
- return tcase;
-}
utc_eina_matrixsparse_cell_clear.c
-utc_eina_matrixsparse_cell_data_get.c
+utc_eina_matrixsparse_cell_data_get_set.c
utc_eina_matrixsparse_cell_data_replace.c
-utc_eina_matrixsparse_cell_data_set.c
utc_eina_matrixsparse_cell_idx_clear.c
utc_eina_matrixsparse_cell_idx_get.c
utc_eina_matrixsparse_cell_position_get.c
utc_eina_matrixsparse_column_idx_clear.c
-utc_eina_matrixsparse_data_idx_get.c
+utc_eina_matrixsparse_data_idx_get_set.c
utc_eina_matrixsparse_data_idx_replace.c
-utc_eina_matrixsparse_data_idx_set.c
utc_eina_matrixsparse_free.c
utc_eina_matrixsparse_iterator_complete_new.c
utc_eina_matrixsparse_iterator_new.c
utc_eina_matrixsparse_new.c
utc_eina_matrixsparse_row_idx_clear.c
-utc_eina_matrixsparse_size_set.c
-utc_eina_matrixsparse_size_get.c
+utc_eina_matrixsparse_size_get_set.c
utc_eina_matrixsparse_cell_clear.c
-utc_eina_matrixsparse_cell_data_get.c
+utc_eina_matrixsparse_cell_data_get_set.c
utc_eina_matrixsparse_cell_data_replace.c
-utc_eina_matrixsparse_cell_data_set.c
utc_eina_matrixsparse_cell_idx_clear.c
utc_eina_matrixsparse_cell_idx_get.c
utc_eina_matrixsparse_cell_position_get.c
utc_eina_matrixsparse_column_idx_clear.c
-utc_eina_matrixsparse_data_idx_get.c
+utc_eina_matrixsparse_data_idx_get_set.c
utc_eina_matrixsparse_data_idx_replace.c
-utc_eina_matrixsparse_data_idx_set.c
utc_eina_matrixsparse_free.c
utc_eina_matrixsparse_iterator_complete_new.c
utc_eina_matrixsparse_iterator_new.c
utc_eina_matrixsparse_new.c
utc_eina_matrixsparse_row_idx_clear.c
-utc_eina_matrixsparse_size_set.c
-utc_eina_matrixsparse_size_get.c
+utc_eina_matrixsparse_size_get_set.c
utc_eina_matrixsparse_cell_clear.c
-utc_eina_matrixsparse_cell_data_get.c
+utc_eina_matrixsparse_cell_data_get_set.c
utc_eina_matrixsparse_cell_data_replace.c
-utc_eina_matrixsparse_cell_data_set.c
utc_eina_matrixsparse_cell_idx_clear.c
utc_eina_matrixsparse_cell_idx_get.c
utc_eina_matrixsparse_cell_position_get.c
utc_eina_matrixsparse_column_idx_clear.c
-utc_eina_matrixsparse_data_idx_get.c
+utc_eina_matrixsparse_data_idx_get_set.c
utc_eina_matrixsparse_data_idx_replace.c
-utc_eina_matrixsparse_data_idx_set.c
utc_eina_matrixsparse_free.c
utc_eina_matrixsparse_iterator_complete_new.c
utc_eina_matrixsparse_iterator_new.c
utc_eina_matrixsparse_new.c
utc_eina_matrixsparse_row_idx_clear.c
-utc_eina_matrixsparse_size_set.c
-utc_eina_matrixsparse_size_get.c
+utc_eina_matrixsparse_size_get_set.c
utc_eina_matrixsparse_cell_clear.c
-utc_eina_matrixsparse_cell_data_get.c
+utc_eina_matrixsparse_cell_data_get_set.c
utc_eina_matrixsparse_cell_data_replace.c
-utc_eina_matrixsparse_cell_data_set.c
utc_eina_matrixsparse_cell_idx_clear.c
utc_eina_matrixsparse_cell_idx_get.c
utc_eina_matrixsparse_cell_position_get.c
utc_eina_matrixsparse_column_idx_clear.c
-utc_eina_matrixsparse_data_idx_get.c
+utc_eina_matrixsparse_data_idx_get_set.c
utc_eina_matrixsparse_data_idx_replace.c
-utc_eina_matrixsparse_data_idx_set.c
utc_eina_matrixsparse_free.c
utc_eina_matrixsparse_iterator_complete_new.c
utc_eina_matrixsparse_iterator_new.c
utc_eina_matrixsparse_new.c
utc_eina_matrixsparse_row_idx_clear.c
-utc_eina_matrixsparse_size_set.c
-utc_eina_matrixsparse_size_get.c
+utc_eina_matrixsparse_size_get_set.c
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-#include "../utc_eina_common.h"
-#include "../../utc_negative_unitest.h"
-
-/**
- * @addtogroup eina_matrixsparse
- * @{
- * @defgroup eina_matrixsparse_cell_data_get eina_matrixsparse_cell_data_get()
- *
- *
- * @precondition
- * @step 1 Initialize eina library with eina_init()
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_EINA_INIT();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_matrixsparse_cell_data_get
- * @{
- * @objective Positive test case checks if function returns data for a cell of the matrix properly
- * @n Input data: pointer to Eina_Matrixsparse_Cell cell object.
- *
- * @procedure
- * @step 1 Create matrix object with single cell (1 row and 1 column)
- * @step 2 Set data of the cell via row and column indexes - pass pointer to variable 'data1'
- * @step 3 Get cell reference inside the matrix as pointer to Eina_Matrixsparse_Cell
- * @step 4 Set cell data by reference - pointer to 'data2'
- * @step 5 Call tested function to get data associated with the cell and check returned value
- *
- * @passcondition Function returns pointer to variable 'data2' set by cell reference on step 4.
- * @}
- */
-START_TEST(utc_eina_matrixsparse_cell_data_get_p)
-{
- int data1 = 0, data2 = 0;
- int result = TEST_FAIL;
- Eina_Matrixsparse_Cell *cell = NULL;
- Eina_Matrixsparse *m = eina_matrixsparse_new(1, 1, NULL, NULL);
-
- if (!m)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Eina_Matrixsparse is not created..", __FILE__, __LINE__);
- }
- else if (eina_matrixsparse_data_idx_set(m, 0, 0, &data1) == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Data is not set..", __FILE__, __LINE__);
- }
- else if (eina_matrixsparse_cell_idx_get(m, 0, 0, &cell) == EINA_FALSE || !cell)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Cell is not got..", __FILE__, __LINE__);
- }
- else if (eina_matrixsparse_cell_data_set(cell, &data2) == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Function has returned EINA_FALSE..", __FILE__, __LINE__);
- }
- else if (eina_matrixsparse_cell_data_get(cell) != &data2)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- }
- else
- {
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- result = TEST_PASS;
- }
- eina_matrixsparse_free(m);
-}
-END_TEST
-
-/**
- * @addtogroup eina_matrixsparse_cell_data_get
- * @{
- * @objective Negative test case checks if function doesn't cause segmentation fault
- * and returns NULL if it is called with NULL instead of pointer to Eina_Matrixsparse_Cell.
- * @n Input data: NULL as pointer to cell reference.
- *
- * @procedure
- * @step 1 Call function and pass NULL instead of its argument
- *
- * @passcondition Function doesn't cause segmentation fault and returns NULL.
-* @}
- */
-START_TEST(utc_eina_matrixsparse_cell_data_get_n)
-{
-
- if (UNITEST_FUNC_NEG_RET(NULL, eina_matrixsparse_cell_data_get, NULL) == TEST_FAIL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-/**
- * @}
- */
-
-TCase * _utc_eina_matrixsparse_cell_data_get()
-{
- TCase *tcase = tcase_create("utc_eina_matrixsparse_cell_data_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_matrixsparse_cell_data_get_p);
- tcase_add_test(tcase, utc_eina_matrixsparse_cell_data_get_n);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Eina.h>
+#include "../utc_eina_common.h"
+#include "../../utc_negative_unitest.h"
+
+/**
+ * @addtogroup eina_matrixsparse
+ * @{
+ * @defgroup eina_matrixsparse_cell_data_get eina_matrixsparse_cell_data_get()
+ *
+ *
+ * @precondition
+ * @step 1 Initialize eina library with eina_init()
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_EINA_INIT();
+}
+
+static void
+teardown(void)
+{
+ printf(" ============ Cleanup ============ \n");
+ eina_shutdown();
+}
+
+/**
+ * @addtogroup eina_matrixsparse_cell_data_get
+ * @{
+ * @objective Positive test case checks if function returns data for a cell of the matrix properly
+ * @n Input data: pointer to Eina_Matrixsparse_Cell cell object.
+ *
+ * @procedure
+ * @step 1 Create matrix object with single cell (1 row and 1 column)
+ * @step 2 Set data of the cell via row and column indexes - pass pointer to variable 'data1'
+ * @step 3 Get cell reference inside the matrix as pointer to Eina_Matrixsparse_Cell
+ * @step 4 Set cell data by reference - pointer to 'data2'
+ * @step 5 Call tested function to get data associated with the cell and check returned value
+ *
+ * @passcondition Function returns pointer to variable 'data2' set by cell reference on step 4.
+ * @}
+ */
+START_TEST(utc_eina_matrixsparse_cell_data_get_p)
+{
+ int data1 = 0, data2 = 0;
+ int result = TEST_FAIL;
+ Eina_Matrixsparse_Cell *cell = NULL;
+ Eina_Matrixsparse *m = eina_matrixsparse_new(1, 1, NULL, NULL);
+
+ if (!m)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Eina_Matrixsparse is not created..", __FILE__, __LINE__);
+ }
+ else if (eina_matrixsparse_data_idx_set(m, 0, 0, &data1) == EINA_FALSE)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Data is not set..", __FILE__, __LINE__);
+ }
+ else if (eina_matrixsparse_cell_idx_get(m, 0, 0, &cell) == EINA_FALSE || !cell)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Cell is not got..", __FILE__, __LINE__);
+ }
+ else if (eina_matrixsparse_cell_data_set(cell, &data2) == EINA_FALSE)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Function has returned EINA_FALSE..", __FILE__, __LINE__);
+ }
+ else if (eina_matrixsparse_cell_data_get(cell) != &data2)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ else
+ {
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+ result = TEST_PASS;
+ }
+ eina_matrixsparse_free(m);
+}
+END_TEST
+
+/**
+ * @addtogroup eina_matrixsparse_cell_data_get
+ * @{
+ * @objective Negative test case checks if function doesn't cause segmentation fault
+ * and returns NULL if it is called with NULL instead of pointer to Eina_Matrixsparse_Cell.
+ * @n Input data: NULL as pointer to cell reference.
+ *
+ * @procedure
+ * @step 1 Call function and pass NULL instead of its argument
+ *
+ * @passcondition Function doesn't cause segmentation fault and returns NULL.
+* @}
+ */
+START_TEST(utc_eina_matrixsparse_cell_data_get_n)
+{
+
+ if (UNITEST_FUNC_NEG_RET(NULL, eina_matrixsparse_cell_data_get, NULL) == TEST_FAIL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup eina_matrixsparse_cell_data_set
+ * @{
+ * @objective Negative test case checks if function doesn't cause segmentation fault
+ * and returns EINA_FALSE if it is called with NULL instead of pointer to Eina_Matrixsparse_Cell.
+ * @n Input data:
+ * @li NULL as pointer to cell reference;
+ * @li NULL as pointer to data (optional parameter).
+ *
+ * @procedure
+ * @step 1 Call function and pass NULL instead of pointer to cell reference
+ *
+ * @passcondition Function doesn't cause segmentation fault and returns EINA_FALSE.
+ * @}
+ */
+START_TEST(utc_eina_matrixsparse_cell_data_set_n)
+{
+
+ CREATE_CHECKED_ARGS_ARRAY(1, 0);
+ UNITEST_FUNC_NEG_CA_RET(EINA_FALSE, eina_matrixsparse_cell_data_set, NULL, NULL);
+
+ if (result_of_testing == TEST_FAIL)
+ 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_eina_matrixsparse_cell_data_get_set()
+{
+ TCase *tcase = tcase_create("utc_eina_matrixsparse_cell_data_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_eina_matrixsparse_cell_data_get_p);
+ tcase_add_test(tcase, utc_eina_matrixsparse_cell_data_get_n);
+ tcase_add_test(tcase, utc_eina_matrixsparse_cell_data_set_n);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-#include "../utc_eina_common.h"
-#include "../../utc_negative_unitest.h"
-
-/**
- * @addtogroup eina_matrixsparse
- * @{
- * @defgroup eina_matrixsparse_cell_data_set eina_matrixsparse_cell_data_set()
- *
- *
- * @precondition
- * @step 1 Initialize eina library with eina_init()
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_EINA_INIT();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_matrixsparse_cell_data_set
- * @{
- * @objective Positive test case checks if function sets data for a cell of the matrix properly
- * @n Input data:
- * @li pointer to Eina_Matrixsparse_Cell cell object;
- * @li pointer to local variable 'data2' with value 0.
- *
- * @procedure
- * @step 1 Create matrix object with single cell (1 row and 1 column)
- * @step 2 Set data of the cell via row and column indexes - pass pointer to variable 'data1'
- * @step 3 Get cell reference inside the matrix as pointer to Eina_Matrixsparse_Cell
- * @step 4 Call tested function to set pointer to 'data2' as the cell data
- * @step 5 Get data associated with the cell and check returned value
- *
- * @passcondition Function returns EINA_TRUE, set and got data point to the same variable 'data2'.
- * @}
- */
-START_TEST(utc_eina_matrixsparse_cell_data_set_p)
-{
- int data1 = 0, data2 = 0;
- int result = TEST_FAIL;
- Eina_Matrixsparse_Cell *cell = NULL;
- Eina_Matrixsparse *m = eina_matrixsparse_new(1, 1, NULL, NULL);
-
- if (!m)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Eina_Matrixsparse is not created..", __FILE__, __LINE__);
- }
- else if (eina_matrixsparse_data_idx_set(m, 0, 0, &data1) == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Data is not set..", __FILE__, __LINE__);
- }
- else if (eina_matrixsparse_cell_idx_get(m, 0, 0, &cell) == EINA_FALSE || !cell)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Cell is not got..", __FILE__, __LINE__);
- }
- else if (eina_matrixsparse_cell_data_set(cell, &data2) == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Function has returned EINA_FALSE..", __FILE__, __LINE__);
- }
- else if (eina_matrixsparse_cell_data_get(cell) != &data2)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- }
- else
- {
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- result = TEST_PASS;
- }
- eina_matrixsparse_free(m);
-}
-END_TEST
-
-/**
- * @addtogroup eina_matrixsparse_cell_data_set
- * @{
- * @objective Negative test case checks if function doesn't cause segmentation fault
- * and returns EINA_FALSE if it is called with NULL instead of pointer to Eina_Matrixsparse_Cell.
- * @n Input data:
- * @li NULL as pointer to cell reference;
- * @li NULL as pointer to data (optional parameter).
- *
- * @procedure
- * @step 1 Call function and pass NULL instead of pointer to cell reference
- *
- * @passcondition Function doesn't cause segmentation fault and returns EINA_FALSE.
- * @}
- */
-START_TEST(utc_eina_matrixsparse_cell_data_set_n)
-{
-
- CREATE_CHECKED_ARGS_ARRAY(1, 0);
- UNITEST_FUNC_NEG_CA_RET(EINA_FALSE, eina_matrixsparse_cell_data_set, NULL, NULL);
-
- if (result_of_testing == TEST_FAIL)
- 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_eina_matrixsparse_cell_data_set()
-{
- TCase *tcase = tcase_create("utc_eina_matrixsparse_cell_data_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_matrixsparse_cell_data_set_p);
- tcase_add_test(tcase, utc_eina_matrixsparse_cell_data_set_n);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-#include "../utc_eina_common.h"
-#include "../../utc_negative_unitest.h"
-
-/**
- * @addtogroup eina_matrixsparse
- * @{
- * @defgroup eina_matrixsparse_data_idx_get eina_matrixsparse_data_idx_get()
- *
- *
- * @precondition
- * @step 1 Initialize eina library with eina_init()
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_EINA_INIT();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_matrixsparse_data_idx_get
- * @{
- * @objective Positive test case checks if function returns data for a cell of given matrix properly
- * @n Input data:
- * @li pointer to matrix object;
- * @li 0 as row to get value;
- * @li 0 as column to get value.
- *
- * @procedure
- * @step 1 Create matrix object with single cell (1 row and 1 column)
- * @step 2 Set data for the cell - pointer to local variable
- * @step 3 Get data associated with the cell
- *
- * @passcondition Function returns data that points to the same variable as was set.
- * @}
- */
-START_TEST(utc_eina_matrixsparse_data_idx_get_p)
-{
- int data = 0;
- int result = TEST_FAIL;
- Eina_Matrixsparse *m = eina_matrixsparse_new(1, 1, NULL, NULL);
-
- if (!m)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Eina_Matrixsparse is not created..", __FILE__, __LINE__);
- }
- else if (eina_matrixsparse_data_idx_set(m, 0, 0, &data) == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Data is not set..", __FILE__, __LINE__);
- }
- else if (eina_matrixsparse_data_idx_get(m, 0, 0) != &data)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- }
- else
- {
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- result = TEST_PASS;
- }
- eina_matrixsparse_free(m);
-}
-END_TEST
-
-/**
- * @addtogroup eina_matrixsparse_data_idx_get
- * @{
- * @objective Negative test case 1 checks if function doesn't cause segmentation fault
- * and returns NULL if it is called with NULL instead of pointer to Eina_Matrixsparse.
- * @n Input data:
- * @li NULL as pointer to matrix object;
- * @li 0 as row to get value;
- * @li 0 as column to get value.
- *
- * @procedure
- * @step 1 Call function and pass NULL instead of pointer to matrix
- *
- * @passcondition Function doesn't cause segmentation fault and returns NULL.
- * @}
- */
-START_TEST(utc_eina_matrixsparse_data_idx_get_n)
-{
-
- CREATE_CHECKED_ARGS_ARRAY(1, 0, 0);
- UNITEST_FUNC_NEG_CA_RET(NULL, eina_matrixsparse_data_idx_get, NULL, 0, 0);
-
- if (result_of_testing == TEST_FAIL)
- 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 eina_matrixsparse_data_idx_get
- * @{
- * @objective Negative test case 2 checks if function doesn't cause segmentation fault
- * and returns NULL if it is called with incorrect cell index (row and column).
- * @n Input data:
- * @li pointer to matrix object;
- * @li 1 as row to set value;
- * @li 1 as column to set value.
- *
- * @procedure
- * @step 1 Create matrix object with single cell (1 row and 1 column)
- * @step 2 Call function and pass 1 as row and as column - incorrect values because
- * matrix indexing starts from 0 and the matrix has just one row and column
- *
- * @passcondition Function doesn't cause segmentation fault and returns NULL.
- * @}
- */
-START_TEST(utc_eina_matrixsparse_data_idx_get_n2)
-{
- Eina_Matrixsparse *m = eina_matrixsparse_new(1, 1, NULL, NULL);
-
- if (!m)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Eina_Matrixsparse is not created..", __FILE__, __LINE__);
- return;
- }
- void *ret = eina_matrixsparse_data_idx_get(m, 1, 1);
- eina_matrixsparse_free(m);
-
- 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
-/**
- * @}
- */
-
-TCase * _utc_eina_matrixsparse_data_idx_get()
-{
- TCase *tcase = tcase_create("utc_eina_matrixsparse_data_idx_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_matrixsparse_data_idx_get_p);
- tcase_add_test(tcase, utc_eina_matrixsparse_data_idx_get_n);
- tcase_add_test(tcase, utc_eina_matrixsparse_data_idx_get_n2);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Eina.h>
+#include "../utc_eina_common.h"
+#include "../../utc_negative_unitest.h"
+
+/**
+ * @addtogroup eina_matrixsparse
+ * @{
+ * @defgroup eina_matrixsparse_data_idx_get eina_matrixsparse_data_idx_get()
+ *
+ *
+ * @precondition
+ * @step 1 Initialize eina library with eina_init()
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_EINA_INIT();
+}
+
+static void
+teardown(void)
+{
+ printf(" ============ Cleanup ============ \n");
+ eina_shutdown();
+}
+
+/**
+ * @addtogroup eina_matrixsparse_data_idx_get
+ * @{
+ * @objective Positive test case checks if function returns data for a cell of given matrix properly
+ * @n Input data:
+ * @li pointer to matrix object;
+ * @li 0 as row to get value;
+ * @li 0 as column to get value.
+ *
+ * @procedure
+ * @step 1 Create matrix object with single cell (1 row and 1 column)
+ * @step 2 Set data for the cell - pointer to local variable
+ * @step 3 Get data associated with the cell
+ *
+ * @passcondition Function returns data that points to the same variable as was set.
+ * @}
+ */
+START_TEST(utc_eina_matrixsparse_data_idx_get_p)
+{
+ int data = 0;
+ int result = TEST_FAIL;
+ Eina_Matrixsparse *m = eina_matrixsparse_new(1, 1, NULL, NULL);
+
+ if (!m)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Eina_Matrixsparse is not created..", __FILE__, __LINE__);
+ }
+ else if (eina_matrixsparse_data_idx_set(m, 0, 0, &data) == EINA_FALSE)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Data is not set..", __FILE__, __LINE__);
+ }
+ else if (eina_matrixsparse_data_idx_get(m, 0, 0) != &data)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ else
+ {
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+ result = TEST_PASS;
+ }
+ eina_matrixsparse_free(m);
+}
+END_TEST
+
+/**
+ * @addtogroup eina_matrixsparse_data_idx_get
+ * @{
+ * @objective Negative test case 1 checks if function doesn't cause segmentation fault
+ * and returns NULL if it is called with NULL instead of pointer to Eina_Matrixsparse.
+ * @n Input data:
+ * @li NULL as pointer to matrix object;
+ * @li 0 as row to get value;
+ * @li 0 as column to get value.
+ *
+ * @procedure
+ * @step 1 Call function and pass NULL instead of pointer to matrix
+ *
+ * @passcondition Function doesn't cause segmentation fault and returns NULL.
+ * @}
+ */
+START_TEST(utc_eina_matrixsparse_data_idx_get_n)
+{
+
+ CREATE_CHECKED_ARGS_ARRAY(1, 0, 0);
+ UNITEST_FUNC_NEG_CA_RET(NULL, eina_matrixsparse_data_idx_get, NULL, 0, 0);
+
+ if (result_of_testing == TEST_FAIL)
+ 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 eina_matrixsparse_data_idx_get
+ * @{
+ * @objective Negative test case 2 checks if function doesn't cause segmentation fault
+ * and returns NULL if it is called with incorrect cell index (row and column).
+ * @n Input data:
+ * @li pointer to matrix object;
+ * @li 1 as row to set value;
+ * @li 1 as column to set value.
+ *
+ * @procedure
+ * @step 1 Create matrix object with single cell (1 row and 1 column)
+ * @step 2 Call function and pass 1 as row and as column - incorrect values because
+ * matrix indexing starts from 0 and the matrix has just one row and column
+ *
+ * @passcondition Function doesn't cause segmentation fault and returns NULL.
+ * @}
+ */
+START_TEST(utc_eina_matrixsparse_data_idx_get_n2)
+{
+ Eina_Matrixsparse *m = eina_matrixsparse_new(1, 1, NULL, NULL);
+
+ if (!m)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Eina_Matrixsparse is not created..", __FILE__, __LINE__);
+ }
+ void *ret = eina_matrixsparse_data_idx_get(m, 1, 1);
+ eina_matrixsparse_free(m);
+
+ if (ret)
+ {
+ 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 eina_matrixsparse_data_idx_set
+ * @{
+ * @objective Negative test case 1 checks if function doesn't cause segmentation fault
+ * and returns EINA_FALSE if it is called with NULL instead of pointer to Eina_Matrixsparse.
+ * @n Input data:
+ * @li NULL as pointer to matrix object;
+ * @li 0 as row to set value;
+ * @li 0 as column to set value;
+ * @li pointer to local variable 'data'.
+ *
+ * @procedure
+ * @step 1 Call function and pass NULL instead of pointer to matrix
+ *
+ * @passcondition Function doesn't cause segmentation fault and returns EINA_FALSE.
+ * @}
+ */
+START_TEST(utc_eina_matrixsparse_data_idx_set_n)
+{
+ int data = 0;
+
+ CREATE_CHECKED_ARGS_ARRAY(1, 0, 0, 0);
+ UNITEST_FUNC_NEG_CA_RET(EINA_FALSE, eina_matrixsparse_data_idx_set, NULL, 0, 0, &data);
+
+ if (result_of_testing == TEST_FAIL)
+ 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 eina_matrixsparse_data_idx_set
+ * @{
+ * @objective Negative test case 2 checks if function doesn't cause segmentation fault
+ * and returns EINA_FALSE if it is called with incorrect cell index (row and column).
+ * @n Input data:
+ * @li pointer to matrix object;
+ * @li 1 as row to set value;
+ * @li 1 as column to set value;
+ * @li NULL as pointer to data (optional parameter).
+ *
+ * @procedure
+ * @step 1 Create matrix object with single cell (1 row and 1 column)
+ * @step 2 Call function and pass 1 as row and as column - incorrect values because
+ * matrix indexing starts from 0 and the matrix has just one row and column
+ *
+ * @passcondition Function doesn't cause segmentation fault and returns EINA_FALSE.
+ * @}
+ */
+START_TEST(utc_eina_matrixsparse_data_idx_set_n2)
+{
+ Eina_Matrixsparse *m = eina_matrixsparse_new(1, 1, NULL, NULL);
+
+ if (!m)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Eina_Matrixsparse is not created..", __FILE__, __LINE__);
+ }
+ Eina_Bool ret = eina_matrixsparse_data_idx_set(m, 1, 1, NULL);
+ eina_matrixsparse_free(m);
+
+ 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
+
+/**
+ * @}
+ */
+
+TCase * _utc_eina_matrixsparse_data_idx_get_set()
+{
+ TCase *tcase = tcase_create("utc_eina_matrixsparse_data_idx_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_eina_matrixsparse_data_idx_get_p);
+ tcase_add_test(tcase, utc_eina_matrixsparse_data_idx_get_n);
+ tcase_add_test(tcase, utc_eina_matrixsparse_data_idx_get_n2);
+ tcase_add_test(tcase, utc_eina_matrixsparse_data_idx_set_n);
+ tcase_add_test(tcase, utc_eina_matrixsparse_data_idx_set_n2);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-#include "../utc_eina_common.h"
-#include "../../utc_negative_unitest.h"
-
-/**
- * @addtogroup eina_matrixsparse
- * @{
- * @defgroup eina_matrixsparse_data_idx_set eina_matrixsparse_data_idx_set()
- *
- *
- * @precondition
- * @step 1 Initialize eina library with eina_init()
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_EINA_INIT();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_matrixsparse_data_idx_set
- * @{
- * @objective Positive test case checks if function sets data for a cell of the matrix properly
- * @n Input data:
- * @li pointer to matrix object;
- * @li 0 as row to set value;
- * @li 0 as column to set value;
- * @li pointer to local variable 'data' with value 0.
- *
- * @procedure
- * @step 1 Create matrix object with single cell (1 row and 1 column)
- * @step 2 Call tested function to set data for the cell
- * @step 3 Get data associated with the cell
- *
- * @passcondition Function returns EINA_TRUE, set and got data point to the same variable.
- * @}
- */
-START_TEST(utc_eina_matrixsparse_data_idx_set_p)
-{
- int data = 0;
- int result = TEST_FAIL;
- Eina_Matrixsparse *m = eina_matrixsparse_new(1, 1, NULL, NULL);
-
- if (!m)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Eina_Matrixsparse is not created..", __FILE__, __LINE__);
- }
- else if (eina_matrixsparse_data_idx_set(m, 0, 0, &data) == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Data is not set..", __FILE__, __LINE__);
- }
- else if (eina_matrixsparse_data_idx_get(m, 0, 0) != &data)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- }
- else
- {
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- result = TEST_PASS;
- }
- eina_matrixsparse_free(m);
-}
-END_TEST
-
-/**
- * @addtogroup eina_matrixsparse_data_idx_set
- * @{
- * @objective Negative test case 1 checks if function doesn't cause segmentation fault
- * and returns EINA_FALSE if it is called with NULL instead of pointer to Eina_Matrixsparse.
- * @n Input data:
- * @li NULL as pointer to matrix object;
- * @li 0 as row to set value;
- * @li 0 as column to set value;
- * @li pointer to local variable 'data'.
- *
- * @procedure
- * @step 1 Call function and pass NULL instead of pointer to matrix
- *
- * @passcondition Function doesn't cause segmentation fault and returns EINA_FALSE.
- * @}
- */
-START_TEST(utc_eina_matrixsparse_data_idx_set_n)
-{
- int data = 0;
-
- CREATE_CHECKED_ARGS_ARRAY(1, 0, 0, 0);
- UNITEST_FUNC_NEG_CA_RET(EINA_FALSE, eina_matrixsparse_data_idx_set, NULL, 0, 0, &data);
-
- if (result_of_testing == TEST_FAIL)
- 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 eina_matrixsparse_data_idx_set
- * @{
- * @objective Negative test case 2 checks if function doesn't cause segmentation fault
- * and returns EINA_FALSE if it is called with incorrect cell index (row and column).
- * @n Input data:
- * @li pointer to matrix object;
- * @li 1 as row to set value;
- * @li 1 as column to set value;
- * @li NULL as pointer to data (optional parameter).
- *
- * @procedure
- * @step 1 Create matrix object with single cell (1 row and 1 column)
- * @step 2 Call function and pass 1 as row and as column - incorrect values because
- * matrix indexing starts from 0 and the matrix has just one row and column
- *
- * @passcondition Function doesn't cause segmentation fault and returns EINA_FALSE.
- * @}
- */
-START_TEST(utc_eina_matrixsparse_data_idx_set_n2)
-{
- Eina_Matrixsparse *m = eina_matrixsparse_new(1, 1, NULL, NULL);
-
- if (!m)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Eina_Matrixsparse is not created..", __FILE__, __LINE__);
- return;
- }
- Eina_Bool ret = eina_matrixsparse_data_idx_set(m, 1, 1, NULL);
- eina_matrixsparse_free(m);
-
- 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
-/**
- * @}
- */
-
-TCase * _utc_eina_matrixsparse_data_idx_set()
-{
- TCase *tcase = tcase_create("utc_eina_matrixsparse_data_idx_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_matrixsparse_data_idx_set_p);
- tcase_add_test(tcase, utc_eina_matrixsparse_data_idx_set_n);
- tcase_add_test(tcase, utc_eina_matrixsparse_data_idx_set_n2);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-#include "../utc_eina_common.h"
-#include "../../utc_negative_unitest.h"
-
-/**
- * @addtogroup eina_matrixsparse
- * @{
- * @defgroup eina_matrixsparse_size_get eina_matrixsparse_size_get()
- *
- *
- * @precondition
- * @step 1 Initialize eina library with eina_init()
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_EINA_INIT();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_matrixsparse_size_get
- * @{
- * @objective Positive test case checks if function returns size of the matrix properly
- * @n Input data:
- * @li pointer to matrix object
- * @li pointer to number to save number of rows
- * @li pointer to number to save number of columns
- *
- * @procedure
- * @step 1 Create matrix object with 10 rows and 10 columns
- * @step 2 Set new size of the matrix - 5 rows and 6 columns
- * @step 3 Get size of the matrix
- *
- * @passcondition Function returns proper size of the matrix, set and got values are the same.
- * @}
- */
-START_TEST(utc_eina_matrixsparse_size_get_p)
-{
- unsigned long rows = 0, cols = 0;
- int result = TEST_FAIL;
- Eina_Matrixsparse *m = eina_matrixsparse_new(10, 10, NULL, NULL);
-
- if (!m)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Eina_Matrixsparse is not created..", __FILE__, __LINE__);
- }
- else if (eina_matrixsparse_size_set(m, 5, 6) == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. New size is not set..", __FILE__, __LINE__);
- }
- else
- {
- eina_matrixsparse_size_get(m, &rows, &cols);
-
- if (rows != 5 || cols != 6)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- }
- else
- {
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- result = TEST_PASS;
- }
- }
- eina_matrixsparse_free(m);
-}
-END_TEST
-
-/**
- * @addtogroup eina_matrixsparse_size_get
- * @{
- * @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 matrix object
- * @li pointer to number to save number of rows
- * @li pointer to number to save number of columns
- *
- * @procedure
- * @step 1 Create matrix object with 10 rows and 10 columns
- * @step 2 Call function and pass (in turn) NULL instead of one from its argument
- * @step 3 Check if got values are the same as set ones when the matrix was being created
- *
- * @passcondition Function doesn't cause segmentation fault.
- * @}
- */
-START_TEST(utc_eina_matrixsparse_size_get_n)
-{
- Eina_Matrixsparse *m = eina_matrixsparse_new(10, 10, NULL, NULL);
-
- if (!m)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Eina_Matrixsparse is not created..", __FILE__, __LINE__);
- return;
- }
- unsigned long rows = 0, cols = 0;
-
- UNITEST_FUNC_NEG(eina_matrixsparse_size_get, m, &rows, &cols);
-
- eina_matrixsparse_free(m);
-
- if (rows != 10 || cols != 10)
- {
- 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_eina_matrixsparse_size_get()
-{
- TCase *tcase = tcase_create("utc_eina_matrixsparse_size_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_matrixsparse_size_get_p);
- tcase_add_test(tcase, utc_eina_matrixsparse_size_get_n);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Eina.h>
+#include "../utc_eina_common.h"
+#include "../../utc_negative_unitest.h"
+
+/**
+ * @addtogroup eina_matrixsparse
+ * @{
+ * @defgroup eina_matrixsparse_size_set eina_matrixsparse_size_set()
+ *
+ *
+ * @precondition
+ * @step 1 Initialize eina library with eina_init()
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_EINA_INIT();
+}
+
+static void
+teardown(void)
+{
+ printf(" ============ Cleanup ============ \n");
+ eina_shutdown();
+}
+
+/**
+ * @addtogroup eina_matrixsparse_size_set
+ * @{
+ * @objective Positive test case checks if function changes size of the matrix properly
+ * @n Input data:
+ * @li pointer to matrix object
+ * @li 5 as new number of rows
+ * @li 6 as new number of columns
+ *
+ * @procedure
+ * @step 1 Create matrix object with 10 rows and 10 columns
+ * @step 2 Call tested function to set new size - 5 rows and 6 columns
+ * @step 3 Get size of the matrix
+ *
+ * @passcondition Function returns EINA_TRUE, set and got values are the same.
+ * @}
+ */
+START_TEST(utc_eina_matrixsparse_size_set_p)
+{
+ unsigned long rows = 0, cols = 0;
+ int result = TEST_FAIL;
+ Eina_Matrixsparse *m = eina_matrixsparse_new(10, 10, NULL, NULL);
+
+ if (!m)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Eina_Matrixsparse is not created..", __FILE__, __LINE__);
+ }
+ else if (eina_matrixsparse_size_set(m, 5, 6) == EINA_FALSE)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. New size is not set..", __FILE__, __LINE__);
+ }
+ else
+ {
+ eina_matrixsparse_size_get(m, &rows, &cols);
+
+ if (rows != 5 || cols != 6)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ else
+ {
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+ result = TEST_PASS;
+ }
+ }
+ eina_matrixsparse_free(m);
+}
+END_TEST
+
+/**
+ * @addtogroup eina_matrixsparse_size_set
+ * @{
+ * @objective Negative test case 1 checks if function doesn't cause segmentation fault
+ * and doens't change size of a given matrix if it is called with 0 as number of rows and columns.
+ * @n Input data:
+ * @li pointer to matrix object
+ * @li 0 as new number of rows
+ * @li 0 as new number of columns
+ *
+ * @procedure
+ * @step 1 Create matrix object with 10 rows and 10 columns
+ * @step 2 Try to set new size - 0 rows and 0 columns
+ * @step 3 Get size of the matrix
+ *
+ * @passcondition Function doesn't cause segmentation fault and returns EINA_FALSE,
+ * got values are the same as were passed when the matrix was created.
+ * @}
+ */
+START_TEST(utc_eina_matrixsparse_size_set_n)
+{
+ Eina_Matrixsparse *m = eina_matrixsparse_new(10, 10, NULL, NULL);
+
+ if (!m)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Eina_Matrixsparse is not created..", __FILE__, __LINE__);
+ }
+ unsigned long rows = 0, cols = 0;
+
+ Eina_Bool ret = eina_matrixsparse_size_set(m, 0, 0);
+ eina_matrixsparse_size_get(m, &rows, &cols);
+ eina_matrixsparse_free(m);
+
+ if (ret == EINA_TRUE || rows != 10 || cols != 10)
+ {
+ 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 eina_matrixsparse_size_set
+ * @{
+ * @objective Negative test case 2 checks if function doesn't cause segmentation fault
+ * if it is called with NULL instead of pointer to Eina_Matrixsparse.
+ * @n Input data:
+ * @li NULL as pointer to matrix object
+ * @li 10 as new number of rows
+ * @li 10 as new number of columns
+ *
+ * @procedure
+ * @step 1 Call function and pass NULL instead of its first argument
+ *
+ * @passcondition Function doesn't cause segmentation fault.
+ * @}
+ */
+START_TEST(utc_eina_matrixsparse_size_set_n2)
+{
+
+ CREATE_CHECKED_ARGS_ARRAY(1, 0, 0);
+ UNITEST_FUNC_NEG_CA_RET(EINA_FALSE, eina_matrixsparse_size_set, NULL, 10, 10);
+
+ if (result_of_testing == TEST_FAIL)
+ 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 eina_matrixsparse_size_get
+ * @{
+ * @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 matrix object
+ * @li pointer to number to save number of rows
+ * @li pointer to number to save number of columns
+ *
+ * @procedure
+ * @step 1 Create matrix object with 10 rows and 10 columns
+ * @step 2 Call function and pass (in turn) NULL instead of one from its argument
+ * @step 3 Check if got values are the same as set ones when the matrix was being created
+ *
+ * @passcondition Function doesn't cause segmentation fault.
+ * @}
+ */
+START_TEST(utc_eina_matrixsparse_size_get_n)
+{
+ Eina_Matrixsparse *m = eina_matrixsparse_new(10, 10, NULL, NULL);
+
+ if (!m)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Eina_Matrixsparse is not created..", __FILE__, __LINE__);
+ }
+ unsigned long rows = 0, cols = 0;
+
+ UNITEST_FUNC_NEG(eina_matrixsparse_size_get, m, &rows, &cols);
+
+ eina_matrixsparse_free(m);
+
+ if (rows != 10 || cols != 10)
+ {
+ 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_eina_matrixsparse_size_get_set()
+{
+ TCase *tcase = tcase_create("utc_eina_matrixsparse_size_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_eina_matrixsparse_size_set_p);
+ tcase_add_test(tcase, utc_eina_matrixsparse_size_set_n);
+ tcase_add_test(tcase, utc_eina_matrixsparse_size_set_n2);
+ tcase_add_test(tcase, utc_eina_matrixsparse_size_get_n);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-#include "../utc_eina_common.h"
-#include "../../utc_negative_unitest.h"
-
-/**
- * @addtogroup eina_matrixsparse
- * @{
- * @defgroup eina_matrixsparse_size_set eina_matrixsparse_size_set()
- *
- *
- * @precondition
- * @step 1 Initialize eina library with eina_init()
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_EINA_INIT();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_matrixsparse_size_set
- * @{
- * @objective Positive test case checks if function changes size of the matrix properly
- * @n Input data:
- * @li pointer to matrix object
- * @li 5 as new number of rows
- * @li 6 as new number of columns
- *
- * @procedure
- * @step 1 Create matrix object with 10 rows and 10 columns
- * @step 2 Call tested function to set new size - 5 rows and 6 columns
- * @step 3 Get size of the matrix
- *
- * @passcondition Function returns EINA_TRUE, set and got values are the same.
- * @}
- */
-START_TEST(utc_eina_matrixsparse_size_set_p)
-{
- unsigned long rows = 0, cols = 0;
- int result = TEST_FAIL;
- Eina_Matrixsparse *m = eina_matrixsparse_new(10, 10, NULL, NULL);
-
- if (!m)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Eina_Matrixsparse is not created..", __FILE__, __LINE__);
- }
- else if (eina_matrixsparse_size_set(m, 5, 6) == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. New size is not set..", __FILE__, __LINE__);
- }
- else
- {
- eina_matrixsparse_size_get(m, &rows, &cols);
-
- if (rows != 5 || cols != 6)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- }
- else
- {
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- result = TEST_PASS;
- }
- }
- eina_matrixsparse_free(m);
-}
-END_TEST
-
-/**
- * @addtogroup eina_matrixsparse_size_set
- * @{
- * @objective Negative test case 1 checks if function doesn't cause segmentation fault
- * and doens't change size of a given matrix if it is called with 0 as number of rows and columns.
- * @n Input data:
- * @li pointer to matrix object
- * @li 0 as new number of rows
- * @li 0 as new number of columns
- *
- * @procedure
- * @step 1 Create matrix object with 10 rows and 10 columns
- * @step 2 Try to set new size - 0 rows and 0 columns
- * @step 3 Get size of the matrix
- *
- * @passcondition Function doesn't cause segmentation fault and returns EINA_FALSE,
- * got values are the same as were passed when the matrix was created.
- * @}
- */
-START_TEST(utc_eina_matrixsparse_size_set_n)
-{
- Eina_Matrixsparse *m = eina_matrixsparse_new(10, 10, NULL, NULL);
-
- if (!m)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Eina_Matrixsparse is not created..", __FILE__, __LINE__);
- return;
- }
- unsigned long rows = 0, cols = 0;
-
- Eina_Bool ret = eina_matrixsparse_size_set(m, 0, 0);
- eina_matrixsparse_size_get(m, &rows, &cols);
- eina_matrixsparse_free(m);
-
- if (ret == EINA_TRUE || rows != 10 || cols != 10)
- {
- 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 eina_matrixsparse_size_set
- * @{
- * @objective Negative test case 2 checks if function doesn't cause segmentation fault
- * if it is called with NULL instead of pointer to Eina_Matrixsparse.
- * @n Input data:
- * @li NULL as pointer to matrix object
- * @li 10 as new number of rows
- * @li 10 as new number of columns
- *
- * @procedure
- * @step 1 Call function and pass NULL instead of its first argument
- *
- * @passcondition Function doesn't cause segmentation fault.
- * @}
- */
-START_TEST(utc_eina_matrixsparse_size_set_n2)
-{
-
- CREATE_CHECKED_ARGS_ARRAY(1, 0, 0);
- UNITEST_FUNC_NEG_CA_RET(EINA_FALSE, eina_matrixsparse_size_set, NULL, 10, 10);
-
- if (result_of_testing == TEST_FAIL)
- 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_eina_matrixsparse_size_set()
-{
- TCase *tcase = tcase_create("utc_eina_matrixsparse_size_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_matrixsparse_size_set_p);
- tcase_add_test(tcase, utc_eina_matrixsparse_size_set_n);
- tcase_add_test(tcase, utc_eina_matrixsparse_size_set_n2);
- return tcase;
-}
-utc_eina_mmap_safety_enabled_set.c
-utc_eina_mmap_safety_enabled_get.c
+utc_eina_mmap_safety_enabled_get_set.c
-utc_eina_mmap_safety_enabled_set.c
-utc_eina_mmap_safety_enabled_get.c
+utc_eina_mmap_safety_enabled_get_set.c
-utc_eina_mmap_safety_enabled_set.c
-utc_eina_mmap_safety_enabled_get.c
+utc_eina_mmap_safety_enabled_get_set.c
-utc_eina_mmap_safety_enabled_set.c
-utc_eina_mmap_safety_enabled_get.c
+utc_eina_mmap_safety_enabled_get_set.c
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-#include "../utc_eina_common.h"
-
-/**
- * @addtogroup eina_mmap
- * @{
- * @defgroup eina_mmap_safety_enabled_get eina_mmap_safety_enabled_get()
- *
- *
- * @precondition
- * @step 1 eina initialized with eina_init()
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_EINA_INIT();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_mmap_safety_enabled_get
- * @{
- * @objective Positive test case checks if function returns correct value of status of mmap_safety Eina property.
- * @n Input Data: function has no arguments.
- *
- * @procedure
- * @step 1 Set mmap_safety to EINA_TRUE
- * @step 2 Check if mmap_safety enabled
- * @step 3 Set mmap_safety to EINA_FALSE - function eina_mmap_safety_enabled_set() should return
- * EINA_FALSE there because it returns current state of mmap_safety
- * @step 4 Check if mmap_safety disabled
- *
- * @passcondition Function returns mmap_safety flag properly.
- * @}
- */
-START_TEST(utc_eina_mmap_safety_enabled_get_p)
-{
- if (eina_mmap_safety_enabled_set(EINA_TRUE) == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. mmap safety is not set to EINA_TRUE..", __FILE__, __LINE__);
- }
- else if (eina_mmap_safety_enabled_get() == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Function has returned EINA_FALSE where EINA_TRUE expected..", __FILE__, __LINE__);
- }
- else if (eina_mmap_safety_enabled_set(EINA_FALSE) == EINA_TRUE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. mmap safety is not set to EINA_FALSE..", __FILE__, __LINE__);
- }
- else if (eina_mmap_safety_enabled_get() == EINA_TRUE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Function has returned EINA_TRUE where EINA_FALSE expected..", __FILE__, __LINE__);
- }
- else
- {
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- }
-}
-END_TEST
-/**
- *@}
- */
-
-TCase * _utc_eina_mmap_safety_enabled_get()
-{
- TCase *tcase = tcase_create("utc_eina_mmap_safety_enabled_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_mmap_safety_enabled_get_p);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Eina.h>
+#include "../utc_eina_common.h"
+
+/**
+ * @addtogroup eina_mmap
+ * @{
+ * @defgroup eina_mmap_safety_enabled_get eina_mmap_safety_enabled_get()
+ *
+ *
+ * @precondition
+ * @step 1 eina initialized with eina_init()
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_EINA_INIT();
+}
+
+static void
+teardown(void)
+{
+ printf(" ============ Cleanup ============ \n");
+ eina_shutdown();
+}
+
+/**
+ * @addtogroup eina_mmap_safety_enabled_get
+ * @{
+ * @objective Positive test case checks if function returns correct value of status of mmap_safety Eina property.
+ * @n Input Data: function has no arguments.
+ *
+ * @procedure
+ * @step 1 Set mmap_safety to EINA_TRUE
+ * @step 2 Check if mmap_safety enabled
+ * @step 3 Set mmap_safety to EINA_FALSE - function eina_mmap_safety_enabled_set() should return
+ * EINA_FALSE there because it returns current state of mmap_safety
+ * @step 4 Check if mmap_safety disabled
+ *
+ * @passcondition Function returns mmap_safety flag properly.
+ * @}
+ */
+START_TEST(utc_eina_mmap_safety_enabled_get_p)
+{
+ if (eina_mmap_safety_enabled_set(EINA_TRUE) == EINA_FALSE)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. mmap safety is not set to EINA_TRUE..", __FILE__, __LINE__);
+ }
+ else if (eina_mmap_safety_enabled_get() == EINA_FALSE)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Function has returned EINA_FALSE where EINA_TRUE expected..", __FILE__, __LINE__);
+ }
+ else if (eina_mmap_safety_enabled_set(EINA_FALSE) == EINA_TRUE)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. mmap safety is not set to EINA_FALSE..", __FILE__, __LINE__);
+ }
+ else if (eina_mmap_safety_enabled_get() == EINA_TRUE)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Function has returned EINA_TRUE where EINA_FALSE expected..", __FILE__, __LINE__);
+ }
+ else
+ {
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+ }
+}
+END_TEST
+/**
+ *@}
+ */
+
+TCase * _utc_eina_mmap_safety_enabled_get_set()
+{
+ TCase *tcase = tcase_create("utc_eina_mmap_safety_enabled_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_eina_mmap_safety_enabled_get_p);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-#include "../utc_eina_common.h"
-
-/**
- * @addtogroup eina_mmap
- * @{
- * @defgroup eina_mmap_safety_enabled_set eina_mmap_safety_enabled_set()
- *
- *
- * @precondition
- * @step 1 Initialize eina library with eina_init()
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_EINA_INIT();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_mmap_safety_enabled_set
- * @{
- * @objective Positive test case checks if function enables and disables status of mmap_safety Eina property correctly.
- * @n Input Data: EINA_TRUE/EINA_FALSE for first/second call.
- *
- * @procedure
- * @step 1 Set mmap_safety to EINA_TRUE
- * @step 2 Check if mmap_safety enabled
- * @step 3 Set mmap_safety to EINA_FALSE - tested function should return EINA_FALSE there because
- * it returns current state of mmap_safety
- * @step 4 Check if mmap_safety disabled
- *
- * @passcondition Function enables and disables mmap_safety flag properly.
- * @}
- */
-START_TEST(utc_eina_mmap_safety_enabled_set_p)
-{
- if (eina_mmap_safety_enabled_set(EINA_TRUE) == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. mmap safety is not set to EINA_TRUE..", __FILE__, __LINE__);
- }
- else if (eina_mmap_safety_enabled_get() == EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Got mmap safety is EINA_FALSE where EINA_TRUE expected..", __FILE__, __LINE__);
- }
- else if (eina_mmap_safety_enabled_set(EINA_FALSE) == EINA_TRUE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. mmap safety is not set to EINA_FALSE..", __FILE__, __LINE__);
- }
- else if (eina_mmap_safety_enabled_get() == EINA_TRUE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Got mmap safety is EINA_TRUE where EINA_FALSE expected..", __FILE__, __LINE__);
- }
- else
- {
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- }
-}
-END_TEST
-/**
- *@}
- */
-
-TCase * _utc_eina_mmap_safety_enabled_set()
-{
- TCase *tcase = tcase_create("utc_eina_mmap_safety_enabled_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_mmap_safety_enabled_set_p);
- return tcase;
-}
utc_eina_rectangle_pool_new.c
utc_eina_rectangle_pool_get.c
utc_eina_rectangle_pool_geometry_get.c
-utc_eina_rectangle_pool_data_set.c
-utc_eina_rectangle_pool_data_get.c
+utc_eina_rectangle_pool_data_get_set.c
utc_eina_rectangle_pool_free.c
utc_eina_rectangle_pool_count.c
utc_eina_rectangle_pool_request.c
utc_eina_rectangle_pool_new.c
utc_eina_rectangle_pool_get.c
utc_eina_rectangle_pool_geometry_get.c
-utc_eina_rectangle_pool_data_set.c
-utc_eina_rectangle_pool_data_get.c
+utc_eina_rectangle_pool_data_get_set.c
utc_eina_rectangle_pool_free.c
utc_eina_rectangle_pool_count.c
utc_eina_rectangle_pool_request.c
utc_eina_rectangle_pool_new.c
utc_eina_rectangle_pool_get.c
utc_eina_rectangle_pool_geometry_get.c
-utc_eina_rectangle_pool_data_set.c
-utc_eina_rectangle_pool_data_get.c
+utc_eina_rectangle_pool_data_get_set.c
utc_eina_rectangle_pool_free.c
utc_eina_rectangle_pool_count.c
utc_eina_rectangle_pool_request.c
utc_eina_rectangle_pool_new.c
utc_eina_rectangle_pool_get.c
utc_eina_rectangle_pool_geometry_get.c
-utc_eina_rectangle_pool_data_set.c
-utc_eina_rectangle_pool_data_get.c
+utc_eina_rectangle_pool_data_get_set.c
utc_eina_rectangle_pool_free.c
utc_eina_rectangle_pool_count.c
utc_eina_rectangle_pool_request.c
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-#include "../utc_eina_common.h"
-#include "../../utc_negative_unitest.h"
-
-/**
- * @addtogroup eina_rectangle
- * @{
- * @defgroup eina_rectangle_pool_data_get eina_rectangle_pool_data_get()
- *
- *
- * @precondition
- * @step 1 Initialize eina library with eina_init()
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_EINA_INIT();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_rectangle_pool_data_get
- * @{
- * @objective Positive test case checks if function returns the data from the given pool properly.
- * @n Input Data: pointer to Eina_Rectangle_Pool.
- *
- * @procedure
- * @step 1 Create new Eina_Rectangle_Pool object
- * @step 2 Create local integer variable 'data'
- * @step 3 Set data for the object
- * @step 4 Get data of the object and compare with passed one
- *
- * @passcondition Function returns pointer to the same data as was set before.
- * @}
- */
-START_TEST(utc_eina_rectangle_pool_data_get_p)
-{
- Eina_Rectangle_Pool *pool = eina_rectangle_pool_new(100, 100);
-
- if (!pool)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Eina_Rectangle_Pool is not created..", __FILE__, __LINE__);
- return;
- }
- int data = 123456;
- eina_rectangle_pool_data_set(pool, &data);
- void *ptr = eina_rectangle_pool_data_get(pool);
-
- if (ptr != &data)
- {
- eina_rectangle_pool_free(pool);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- eina_rectangle_pool_free(pool);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup eina_rectangle_pool_data_get
- * @{
- * @objective Negative test case checks if function doesn't cause segmentation fault
- * and returns NULL if it is called with NULL instead of pointer to Eina_Rectangle_Pool.
- * @n Input Data: NULL as pointer to pool.
- *
- * @procedure
- * @step 1 Call function and pass NULL instead of its argument
- *
- * @passcondition Function doesn't cause segmentation fault and returns NULL.
- * @}
- */
-START_TEST(utc_eina_rectangle_pool_data_get_n)
-{
-
- if (UNITEST_FUNC_NEG_RET(NULL, eina_rectangle_pool_data_get, NULL) == TEST_FAIL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-/**
- *@}
- */
-
-TCase * _utc_eina_rectangle_pool_data_get()
-{
- TCase *tcase = tcase_create("utc_eina_rectangle_pool_data_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_rectangle_pool_data_get_p);
- tcase_add_test(tcase, utc_eina_rectangle_pool_data_get_n);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Eina.h>
+#include "../utc_eina_common.h"
+#include "../../utc_negative_unitest.h"
+
+/**
+ * @addtogroup eina_rectangle
+ * @{
+ * @defgroup eina_rectangle_pool_data_get eina_rectangle_pool_data_get()
+ *
+ *
+ * @precondition
+ * @step 1 Initialize eina library with eina_init()
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_EINA_INIT();
+}
+
+static void
+teardown(void)
+{
+ printf(" ============ Cleanup ============ \n");
+ eina_shutdown();
+}
+
+/**
+ * @addtogroup eina_rectangle_pool_data_get
+ * @{
+ * @objective Positive test case checks if function returns the data from the given pool properly.
+ * @n Input Data: pointer to Eina_Rectangle_Pool.
+ *
+ * @procedure
+ * @step 1 Create new Eina_Rectangle_Pool object
+ * @step 2 Create local integer variable 'data'
+ * @step 3 Set data for the object
+ * @step 4 Get data of the object and compare with passed one
+ *
+ * @passcondition Function returns pointer to the same data as was set before.
+ * @}
+ */
+START_TEST(utc_eina_rectangle_pool_data_get_p)
+{
+ Eina_Rectangle_Pool *pool = eina_rectangle_pool_new(100, 100);
+
+ if (!pool)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Eina_Rectangle_Pool is not created..", __FILE__, __LINE__);
+ }
+ int data = 123456;
+ eina_rectangle_pool_data_set(pool, &data);
+ void *ptr = eina_rectangle_pool_data_get(pool);
+
+ if (ptr != &data)
+ {
+ eina_rectangle_pool_free(pool);
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ eina_rectangle_pool_free(pool);
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup eina_rectangle_pool_data_get
+ * @{
+ * @objective Negative test case checks if function doesn't cause segmentation fault
+ * and returns NULL if it is called with NULL instead of pointer to Eina_Rectangle_Pool.
+ * @n Input Data: NULL as pointer to pool.
+ *
+ * @procedure
+ * @step 1 Call function and pass NULL instead of its argument
+ *
+ * @passcondition Function doesn't cause segmentation fault and returns NULL.
+ * @}
+ */
+START_TEST(utc_eina_rectangle_pool_data_get_n)
+{
+
+ if (UNITEST_FUNC_NEG_RET(NULL, eina_rectangle_pool_data_get, NULL) == TEST_FAIL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup eina_rectangle_pool_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 Eina_Rectangle_Pool;
+ * @li pointer to local variable.
+ *
+ * @procedure
+ * @step 1 Create new Eina_Rectangle_Pool object
+ * @step 2 Create local integer variable 'data'
+ * @step 3 Call function twice and pass (in turn) NULL instead of one from its arguments
+ *
+ * @passcondition Function doesn't cause segmentation fault.
+ * @}
+ */
+START_TEST(utc_eina_rectangle_pool_data_set_n)
+{
+ Eina_Rectangle_Pool *pool = eina_rectangle_pool_new(100, 100);
+
+ if (!pool)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Eina_Rectangle_Pool is not created..", __FILE__, __LINE__);
+ }
+ int data = 123456;
+
+ UNITEST_FUNC_NEG(eina_rectangle_pool_data_set, pool, &data);
+
+ eina_rectangle_pool_free(pool);
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_eina_rectangle_pool_data_get_set()
+{
+ TCase *tcase = tcase_create("utc_eina_rectangle_pool_data_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_eina_rectangle_pool_data_get_p);
+ tcase_add_test(tcase, utc_eina_rectangle_pool_data_get_n);
+ tcase_add_test(tcase, utc_eina_rectangle_pool_data_set_n);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-#include "../utc_eina_common.h"
-#include "../../utc_negative_unitest.h"
-
-/**
- * @addtogroup eina_rectangle
- * @{
- * @defgroup eina_rectangle_pool_data_set eina_rectangle_pool_data_set()
- *
- *
- * @precondition
- * @step 1 Initialize eina library with eina_init()
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_EINA_INIT();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_rectangle_pool_data_set
- * @{
- * @objective Positive test case checks if function sets a data for the given pool properly.
- * @n Input Data:
- * @li pointer to Eina_Rectangle_Pool;
- * @li pointer to local variable.
- *
- * @procedure
- * @step 1 Create new Eina_Rectangle_Pool object
- * @step 2 Create local integer variable 'data'
- * @step 3 Call tested function to set data for the object
- * @step 4 Get data of the object and compare with passed one
- *
- * @passcondition Function sets data properly, set and got data are the same.
- * @}
- */
-START_TEST(utc_eina_rectangle_pool_data_set_p)
-{
- Eina_Rectangle_Pool *pool = eina_rectangle_pool_new(100, 100);
-
- if (!pool)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Eina_Rectangle_Pool is not created..", __FILE__, __LINE__);
- return;
- }
- int data = 123456;
- eina_rectangle_pool_data_set(pool, &data);
- void *ptr = eina_rectangle_pool_data_get(pool);
-
- if (ptr != &data)
- {
- eina_rectangle_pool_free(pool);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- eina_rectangle_pool_free(pool);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup eina_rectangle_pool_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 Eina_Rectangle_Pool;
- * @li pointer to local variable.
- *
- * @procedure
- * @step 1 Create new Eina_Rectangle_Pool object
- * @step 2 Create local integer variable 'data'
- * @step 3 Call function twice and pass (in turn) NULL instead of one from its arguments
- *
- * @passcondition Function doesn't cause segmentation fault.
- * @}
- */
-START_TEST(utc_eina_rectangle_pool_data_set_n)
-{
- Eina_Rectangle_Pool *pool = eina_rectangle_pool_new(100, 100);
-
- if (!pool)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Eina_Rectangle_Pool is not created..", __FILE__, __LINE__);
- return;
- }
- int data = 123456;
-
- UNITEST_FUNC_NEG(eina_rectangle_pool_data_set, pool, &data);
-
- eina_rectangle_pool_free(pool);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-/**
- *@}
- */
-
-TCase * _utc_eina_rectangle_pool_data_set()
-{
- TCase *tcase = tcase_create("utc_eina_rectangle_pool_data_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_rectangle_pool_data_set_p);
- tcase_add_test(tcase, utc_eina_rectangle_pool_data_set_n);
- return tcase;
-}
-utc_eina_xattr_double_get.c
-utc_eina_xattr_double_set.c
+utc_eina_xattr_double_get_set.c
utc_eina_xattr_fd_ls.c
-utc_eina_xattr_get.c
-utc_eina_xattr_int_get.c
-utc_eina_xattr_int_set.c
+utc_eina_xattr_get_set.c
+utc_eina_xattr_int_get_set.c
utc_eina_xattr_ls.c
-utc_eina_xattr_set.c
-utc_eina_xattr_string_get.c
-utc_eina_xattr_string_set.c
+utc_eina_xattr_string_get_set.c
utc_eina_xattr_value_fd_ls.c
utc_eina_xattr_value_ls.c
utc_eina_xattr_functional.c
-utc_eina_xattr_double_get.c
-utc_eina_xattr_double_set.c
+utc_eina_xattr_double_get_set.c
utc_eina_xattr_fd_ls.c
-utc_eina_xattr_get.c
-utc_eina_xattr_int_get.c
-utc_eina_xattr_int_set.c
+utc_eina_xattr_get_set.c
+utc_eina_xattr_int_get_set.c
utc_eina_xattr_ls.c
-utc_eina_xattr_set.c
-utc_eina_xattr_string_get.c
-utc_eina_xattr_string_set.c
+utc_eina_xattr_string_get_set.c
utc_eina_xattr_value_fd_ls.c
utc_eina_xattr_value_ls.c
utc_eina_xattr_functional.c
-utc_eina_xattr_double_get.c
-utc_eina_xattr_double_set.c
+utc_eina_xattr_double_get_set.c
utc_eina_xattr_fd_ls.c
-utc_eina_xattr_get.c
-utc_eina_xattr_int_get.c
-utc_eina_xattr_int_set.c
+utc_eina_xattr_get_set.c
+utc_eina_xattr_int_get_set.c
utc_eina_xattr_ls.c
-utc_eina_xattr_set.c
-utc_eina_xattr_string_get.c
-utc_eina_xattr_string_set.c
+utc_eina_xattr_string_get_set.c
utc_eina_xattr_value_fd_ls.c
utc_eina_xattr_value_ls.c
#utc_eina_xattr_functional.c
-utc_eina_xattr_double_get.c
-utc_eina_xattr_double_set.c
+utc_eina_xattr_double_get_set.c
utc_eina_xattr_fd_ls.c
-utc_eina_xattr_get.c
-utc_eina_xattr_int_get.c
-utc_eina_xattr_int_set.c
+utc_eina_xattr_get_set.c
+utc_eina_xattr_int_get_set.c
utc_eina_xattr_ls.c
-utc_eina_xattr_set.c
-utc_eina_xattr_string_get.c
-utc_eina_xattr_string_set.c
+utc_eina_xattr_string_get_set.c
utc_eina_xattr_value_fd_ls.c
utc_eina_xattr_value_ls.c
#utc_eina_xattr_functional.c
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-#include "../utc_eina_common.h"
-
-/**
- * @addtogroup eina_xattr
- * @{
- * @defgroup eina_xattr_double_get eina_xattr_double_get()
- *
- * @precondition
- * @step 1 Initialize the Eina library.
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_EINA_INIT();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_xattr_double_get
- * @{
- * @objective Positive Test case 01: Get a double from an extended attribute properties.
- * @n Input Data:
- * @li file The file to get the double from;
- * @li attribute The attribute to set;
- * @li value Where to put the extracted value;
- *
- * @procedure
- * @step 1 Create and open the file.
- * @step 2 Create "user.mime_type" extended attribute of the file.
- * @step 3 Set the double for "user.comment" extended attribute properties of the file.
- * @step 4 Get the double from the "user.comment" extended attribute properties of the file.
- * @step 5 Compare set double with returned double.
- *
- * @passcondition: Test passes if EINA_TRUE is returned, gotten and set double are equal and no segmentation fault.
- * @}
- */
-START_TEST(utc_eina_xattr_double_get_p_1)
-{
- FILE * file = NULL;
- file = fopen("_eina_file", "w");
- if (file == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- fclose(file);
-
- const char* data = "data";
- double PI = 3.14;
-
- if (!eina_xattr_set("_eina_file", "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- Eina_Bool is_set = EINA_FALSE;
- is_set = eina_xattr_double_set("_eina_file", "user.comment", PI, EINA_XATTR_INSERT);
-
- double returned_double;
- Eina_Bool is_get = eina_xattr_double_get("_eina_file", "user.comment", &returned_double);
- if ((is_set == EINA_TRUE) && (returned_double == PI) && (is_get == EINA_TRUE))
- {
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
- }
-
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
-}
-END_TEST
-
-/**
- * @}
- */
-
-TCase * _utc_eina_xattr_double_get()
-{
- TCase *tcase = tcase_create("utc_eina_xattr_double_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_xattr_double_get_p_1);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Eina.h>
+#include "../utc_eina_common.h"
+
+/**
+ * @addtogroup eina_xattr
+ * @{
+ * @defgroup eina_xattr_double_set eina_xattr_double_set()
+ *
+ * @precondition
+ * @step 1 Initialize the Eina library.
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_EINA_INIT();
+}
+
+static void
+teardown(void)
+{
+ printf(" ============ Cleanup ============ \n");
+ eina_shutdown();
+}
+
+/**
+ * @addtogroup eina_xattr_double_set
+ * @{
+ * @objective Positive Test case 01: Set a double as a extended attribute properties.
+ * @n Input Data:
+ * @li file The file to set the double to;
+ * @li attribute The attribute to set;
+ * @li value The double to set;
+ * @li flags Define the set policy.
+ *
+ * @procedure
+ * @step 1 Create and open the file.
+ * @step 2 Create "user.mime_type" extended attribute of the file.
+ * @step 3 Set the double for "user.comment" extended attribute properties of the file.
+ * @step 4 Get the double from the "user.comment" extended attribute properties of the file.
+ * @step 5 Compare set double with returned double.
+ *
+ * @passcondition: Test passes if EINA_TRUE is returned, gotten and set double are equal and no segmentation fault.
+ * @}
+ */
+START_TEST(utc_eina_xattr_double_set_p_1)
+{
+ FILE * file = NULL;
+ file = fopen("_eina_file", "w");
+ if (file == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ return;
+ }
+
+ fclose(file);
+
+ const char* data = "data";
+ double PI = 3.14;
+
+ if (!eina_xattr_set("_eina_file", "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT))
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ return;
+ }
+
+ Eina_Bool is_set = EINA_FALSE;
+ is_set = eina_xattr_double_set("_eina_file", "user.comment", PI, EINA_XATTR_INSERT);
+
+ double returned_double;
+ Eina_Bool is_get = eina_xattr_double_get("_eina_file", "user.comment", &returned_double);
+ if ((is_set == EINA_TRUE) && (returned_double == PI) && (is_get == EINA_TRUE))
+ {
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+ return;
+ }
+
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ return;
+}
+END_TEST
+
+/**
+ * @}
+ */
+
+TCase * _utc_eina_xattr_double_get_set()
+{
+ TCase *tcase = tcase_create("utc_eina_xattr_double_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_eina_xattr_double_set_p_1);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-#include "../utc_eina_common.h"
-
-/**
- * @addtogroup eina_xattr
- * @{
- * @defgroup eina_xattr_double_set eina_xattr_double_set()
- *
- * @precondition
- * @step 1 Initialize the Eina library.
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_EINA_INIT();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_xattr_double_set
- * @{
- * @objective Positive Test case 01: Set a double as a extended attribute properties.
- * @n Input Data:
- * @li file The file to set the double to;
- * @li attribute The attribute to set;
- * @li value The double to set;
- * @li flags Define the set policy.
- *
- * @procedure
- * @step 1 Create and open the file.
- * @step 2 Create "user.mime_type" extended attribute of the file.
- * @step 3 Set the double for "user.comment" extended attribute properties of the file.
- * @step 4 Get the double from the "user.comment" extended attribute properties of the file.
- * @step 5 Compare set double with returned double.
- *
- * @passcondition: Test passes if EINA_TRUE is returned, gotten and set double are equal and no segmentation fault.
- * @}
- */
-START_TEST(utc_eina_xattr_double_set_p_1)
-{
- FILE * file = NULL;
- file = fopen("_eina_file", "w");
- if (file == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- fclose(file);
-
- const char* data = "data";
- double PI = 3.14;
-
- if (!eina_xattr_set("_eina_file", "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- Eina_Bool is_set = EINA_FALSE;
- is_set = eina_xattr_double_set("_eina_file", "user.comment", PI, EINA_XATTR_INSERT);
-
- double returned_double;
- Eina_Bool is_get = eina_xattr_double_get("_eina_file", "user.comment", &returned_double);
- if ((is_set == EINA_TRUE) && (returned_double == PI) && (is_get == EINA_TRUE))
- {
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
- }
-
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
-}
-END_TEST
-
-/**
- * @}
- */
-
-TCase * _utc_eina_xattr_double_set()
-{
- TCase *tcase = tcase_create("utc_eina_xattr_double_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_xattr_double_set_p_1);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-#include "../utc_eina_common.h"
-
-/**
- * @addtogroup eina_xattr
- * @{
- * @defgroup eina_xattr_get eina_xattr_get()
- *
- * @precondition
- * @step 1 Initialize the Eina library.
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_EINA_INIT();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_xattr_get
- * @{
- * @objective Positive Test case 01: Get the extended attribute on a file.
- * @n Input Data:
- * @li file The file to retrieve the extended attribute from;
- * @li attribute The extended attribute name to retrieve;
- * @li size The size of the retrieved extended attribute.
- *
- * @procedure
- * @step 1 Create and open the file.
- * @step 2 Create or replace the extended attribute of the file.
- * @step 3 Retrieve the extended attribute from the file.
- * @step 4 Compare returned data.
- *
- * @passcondition: The allocated data that hold the extended attribute value, there isn't segmentation fault.
- * @}
- */
-START_TEST(utc_eina_xattr_get_p_1)
-{
- FILE *file = NULL;
- file = fopen("_eina_file", "w");
- if (file == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- fclose(file);
-
- const char* data = "data";
- ssize_t size = 0;
- Eina_Bool is_set = eina_xattr_set("_eina_file", "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT);
- const char* str = (const char*) eina_xattr_get("_eina_file", "user.mime_type", &size);
-
- if (str == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- if ((is_set == EINA_FALSE) || (strcmp(data, str) != 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__);
- return;
-}
-END_TEST
-
-/**
- * @addtogroup eina_xattr_get
- * @{
- * @objective Positive Test case 02: Get the extendet attribute on a file.
- * @n Input Data:
- * @li file The file to retrieve the extended attribute from;
- * @li attribute The extended attribute name to retrieve;
- * @li size The size of the retrieved extended attribute.
- *
- * @procedure
- * @step 1 Create and open the file.
- * @step 2 Create or replace the extended attribute of the file.
- * @step 3 Replace the data of the previously existed extended attribute of the file.
- * @step 4 Retrieve the extended attribute from the file.
- * @step 5 Compare returned data.
- *
- * @passcondition: The allocated data that hold the extended attribute value, there isn't segmentation fault.
- * @}
- */
-START_TEST(utc_eina_xattr_get_p_2)
-{
- FILE * file = NULL;
- file = fopen("_eina_file", "w");
- if (file == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- fclose(file);
-
- const char* data = "data";
- const char* new_data = "new_data";
- ssize_t size = 0;
-
- if (!eina_xattr_set("_eina_file", "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- Eina_Bool is_set = eina_xattr_set("_eina_file", "user.mime_type", (const void*) new_data, strlen(new_data) + sizeof(char), EINA_XATTR_REPLACE);
- const char* str = (const char*) eina_xattr_get("_eina_file", "user.mime_type", &size);
-
- if (str == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- if ((is_set == EINA_FALSE) || (strcmp(new_data, str) != 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__);
- return;
-}
-END_TEST
-
-/**
- * @}
- */
-
-TCase * _utc_eina_xattr_get()
-{
- TCase *tcase = tcase_create("utc_eina_xattr_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_xattr_get_p_1);
- tcase_add_test(tcase, utc_eina_xattr_get_p_2);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Eina.h>
+#include "../utc_eina_common.h"
+
+/**
+ * @addtogroup eina_xattr
+ * @{
+ * @defgroup eina_xattr_set eina_xattr_set()
+ *
+ * @precondition
+ * @step 1 Initialize the Eina library.
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_EINA_INIT();
+}
+
+static void
+teardown(void)
+{
+ printf(" ============ Cleanup ============ \n");
+ eina_shutdown();
+}
+
+/**
+ * @addtogroup eina_xattr_set
+ * @{
+ * @objective Positive Test case 01: Set the extended attribute on a file.
+ * @n Input Data:
+ * @li name of the file to set the extended attribute to;
+ * @li the attribute to set;
+ * @li the data to set;
+ * @li the length of the data to set;
+ * @li EINA_XATTR_INSERT as the pararmeter that define the set policy.
+ *
+ * @procedure
+ * @step 1 Create and open the file.
+ * @step 2 Create or replace the extended attribute of the file.
+ * @step 3 Retrieve the extended attribute from the file.
+ *
+ * @passcondition: Test passes if EINA_TRUE is returned, returned and set strings are equal and no segmentation fault.
+ * @}
+ */
+START_TEST(utc_UIFW_eina_xattr_set_p_1)
+{
+ FILE *file = NULL;
+ file = fopen("_eina_file", "w");
+ if (file == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ return;
+ }
+
+ const char* data = "data";
+ ssize_t size = 0;
+ Eina_Bool is_set = eina_xattr_set("_eina_file", "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT);
+ const char* str = (const char*) eina_xattr_get("_eina_file", "user.mime_type", &size);
+
+ if ((is_set == EINA_FALSE) || (str == NULL) || (strcmp(data, str) != 0))
+ {
+ fclose(file);
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ return;
+ }
+
+ fclose(file);
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+ return;
+}
+END_TEST
+
+/**
+ * @addtogroup eina_xattr_set
+ * @{
+ * @objective Positive Test case 02: Set the extended attribute on a file.
+ * @n Input Data:
+ * @li name of the file to set the extended attribute to;
+ * @li the attribute to set;
+ * @li the data to set;
+ * @li the length of the data to set;
+ * @li EINA_XATTR_REPLACE as the pararmeter that define the set policy.
+ *
+ * @procedure
+ * @step 1 Create and open the file.
+ * @step 2 Create or replace the extended attribute of the file.
+ * @step 3 Replace the data of the previously existed extended attribute of the file.
+ * @step 4 Retrieve the extended attribute from the file.
+ *
+ * @passcondition: Test passes if EINA_TRUE is returned, returned and set strings are equal and no segmentation fault.
+ * @}
+ */
+START_TEST(utc_UIFW_eina_xattr_set_p_2)
+{
+ FILE * file = NULL;
+ file = fopen("_eina_file", "w");
+ if (file == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ return;
+ }
+
+ const char* data = "data";
+ const char* new_data = "new_data";
+ ssize_t size = 0;
+
+ if (!eina_xattr_set("_eina_file", "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT))
+ {
+ fclose(file);
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ return;
+ }
+
+ Eina_Bool is_set = eina_xattr_set("_eina_file", "user.mime_type", (const void*) new_data, strlen(new_data) + sizeof(char), EINA_XATTR_REPLACE);
+ const char* str = (const char*) eina_xattr_get("_eina_file", "user.mime_type", &size);
+
+ if ((is_set == EINA_FALSE) || (str == NULL) || (strcmp(new_data, str) != 0))
+ {
+ fclose(file);
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ return;
+ }
+
+ fclose(file);
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+ return;
+}
+END_TEST
+
+/**
+ * @addtogroup eina_xattr_set
+ * @{
+ * @objective Negative Test case 01: Set the extended attribute on NULL as the file.
+ * @n Input Data:
+ * @li NULL as the name of the file to set the extended attribute to;
+ * @li the attribute to set;
+ * @li the data to set;
+ * @li the length of the data to set;
+ * @li EINA_XATTR_INSERT as the pararmeter that define the set policy.
+ *
+ * @procedure
+ * @step 1 Try to set the extended attribute on NULL as the file.
+ *
+ * @passcondition: Test passes if EINA_FALSE is returned and no segmentation fault.
+ * @}
+ */
+START_TEST(utc_UIFW_eina_xattr_set_n_1)
+{
+
+ const char* data = "data";
+
+ if (eina_xattr_set(NULL, "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT))
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ return;
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+ return;
+}
+END_TEST
+
+/**
+ * @}
+ */
+
+TCase * _utc_eina_xattr_get_set()
+{
+ TCase *tcase = tcase_create("utc_eina_xattr_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_UIFW_eina_xattr_set_p_1);
+ tcase_add_test(tcase, utc_UIFW_eina_xattr_set_p_2);
+ tcase_add_test(tcase, utc_UIFW_eina_xattr_set_n_1);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-#include "../utc_eina_common.h"
-
-/**
- * @addtogroup eina_xattr
- * @{
- * @defgroup eina_xattr_int_get eina_xattr_int_get()
- *
- * @precondition
- * @step 1 Initialize the Eina library.
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_EINA_INIT();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_xattr_int_get
- * @{
- * @objective Positive Test case 01: Get a int from an extended attribute properties.
- * @n Input Data:
- * @li file The file to get the string from;
- * @li attribute The attribute to get;
- * @li value Where to put the extracted value.
- *
- * @procedure
- * @step 1 Create and open the file.
- * @step 2 Create "user.mime_type" extended attribute of the file.
- * @step 3 Set the int for "user.comment" extended attribute properties of the file.
- * @step 4 Get the int from the "user.comment" extended attribute properties of the file.
- * @step 5 Compare set int with returned int.
- *
- * @passcondition: Test passes if EINA_TRUE is returned, gotten and set int are equal and no segmentation fault.
- * @}
- */
-START_TEST(utc_eina_xattr_int_get_p_1)
-{
- FILE * file = NULL;
- file = fopen("_eina_file", "w");
- if (file == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- fclose(file);
-
- const char* data = "data";
- int value = 777;
-
- if (!eina_xattr_set("_eina_file", "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- Eina_Bool is_set = EINA_FALSE;
- is_set = eina_xattr_int_set("_eina_file", "user.comment", value, EINA_XATTR_INSERT);
-
- int returned_int;
- Eina_Bool is_get = eina_xattr_int_get("_eina_file", "user.comment", &returned_int);
- if ((is_set == EINA_TRUE) && (returned_int == value) && (is_get == EINA_TRUE))
- {
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
- }
-
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
-}
-END_TEST
-
-/**
- * @}
- */
-
-TCase * _utc_eina_xattr_int_get()
-{
- TCase *tcase = tcase_create("utc_eina_xattr_int_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_xattr_int_get_p_1);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Eina.h>
+#include "../utc_eina_common.h"
+
+/**
+ * @addtogroup eina_xattr
+ * @{
+ * @defgroup eina_xattr_int_set eina_xattr_int_set()
+ *
+ * @precondition
+ * @step 1 Initialize the Eina library.
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_EINA_INIT();
+}
+
+static void
+teardown(void)
+{
+ printf(" ============ Cleanup ============ \n");
+ eina_shutdown();
+}
+
+/**
+ * @addtogroup eina_xattr_int_set
+ * @{
+ * @objective Positive Test case 01: Set an int as a extended attribute properties.
+ * @n Input Data:
+ * @li file The file to set the int to;
+ * @li attribute The attribute to set;
+ * @li value The int to set;
+ * @li flags Define the set policy.
+ *
+ * @procedure
+ * @step 1 Create and open the file.
+ * @step 2 Create "user.mime_type" extended attribute of the file.
+ * @step 3 Set the int for "user.comment" extended attribute properties of the file.
+ * @step 4 Get the int from the "user.comment" extended attribute properties of the file.
+ * @step 5 Compare set int with returned int.
+ *
+ * @passcondition: Test passes if EINA_TRUE is returned, gotten and set int are equal and no segmentation fault.
+ * @}
+ */
+START_TEST(utc_eina_xattr_int_set_p_1)
+{
+ FILE * file = NULL;
+ file = fopen("_eina_file", "w");
+ if (file == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ return;
+ }
+
+ fclose(file);
+
+ const char* data = "data";
+ int value = 777;
+
+ if (!eina_xattr_set("_eina_file", "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT))
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ return;
+ }
+
+ Eina_Bool is_set = EINA_FALSE;
+ is_set = eina_xattr_int_set("_eina_file", "user.comment", value, EINA_XATTR_INSERT);
+
+ int returned_int;
+ Eina_Bool is_get = eina_xattr_int_get("_eina_file", "user.comment", &returned_int);
+ if ((is_set == EINA_TRUE) && (returned_int == value) && (is_get == EINA_TRUE))
+ {
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+ return;
+ }
+
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ return;
+}
+END_TEST
+
+/**
+ * @}
+ */
+
+TCase * _utc_eina_xattr_int_get_set()
+{
+ TCase *tcase = tcase_create("utc_eina_xattr_int_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_eina_xattr_int_set_p_1);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-#include "../utc_eina_common.h"
-
-/**
- * @addtogroup eina_xattr
- * @{
- * @defgroup eina_xattr_int_set eina_xattr_int_set()
- *
- * @precondition
- * @step 1 Initialize the Eina library.
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_EINA_INIT();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_xattr_int_set
- * @{
- * @objective Positive Test case 01: Set an int as a extended attribute properties.
- * @n Input Data:
- * @li file The file to set the int to;
- * @li attribute The attribute to set;
- * @li value The int to set;
- * @li flags Define the set policy.
- *
- * @procedure
- * @step 1 Create and open the file.
- * @step 2 Create "user.mime_type" extended attribute of the file.
- * @step 3 Set the int for "user.comment" extended attribute properties of the file.
- * @step 4 Get the int from the "user.comment" extended attribute properties of the file.
- * @step 5 Compare set int with returned int.
- *
- * @passcondition: Test passes if EINA_TRUE is returned, gotten and set int are equal and no segmentation fault.
- * @}
- */
-START_TEST(utc_eina_xattr_int_set_p_1)
-{
- FILE * file = NULL;
- file = fopen("_eina_file", "w");
- if (file == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- fclose(file);
-
- const char* data = "data";
- int value = 777;
-
- if (!eina_xattr_set("_eina_file", "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- Eina_Bool is_set = EINA_FALSE;
- is_set = eina_xattr_int_set("_eina_file", "user.comment", value, EINA_XATTR_INSERT);
-
- int returned_int;
- Eina_Bool is_get = eina_xattr_int_get("_eina_file", "user.comment", &returned_int);
- if ((is_set == EINA_TRUE) && (returned_int == value) && (is_get == EINA_TRUE))
- {
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
- }
-
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
-}
-END_TEST
-
-/**
- * @}
- */
-
-TCase * _utc_eina_xattr_int_set()
-{
- TCase *tcase = tcase_create("utc_eina_xattr_int_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_eina_xattr_int_set_p_1);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-#include "../utc_eina_common.h"
-
-/**
- * @addtogroup eina_xattr
- * @{
- * @defgroup eina_xattr_set eina_xattr_set()
- *
- * @precondition
- * @step 1 Initialize the Eina library.
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_EINA_INIT();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_xattr_set
- * @{
- * @objective Positive Test case 01: Set the extended attribute on a file.
- * @n Input Data:
- * @li name of the file to set the extended attribute to;
- * @li the attribute to set;
- * @li the data to set;
- * @li the length of the data to set;
- * @li EINA_XATTR_INSERT as the pararmeter that define the set policy.
- *
- * @procedure
- * @step 1 Create and open the file.
- * @step 2 Create or replace the extended attribute of the file.
- * @step 3 Retrieve the extended attribute from the file.
- *
- * @passcondition: Test passes if EINA_TRUE is returned, returned and set strings are equal and no segmentation fault.
- * @}
- */
-START_TEST(utc_UIFW_eina_xattr_set_p_1)
-{
- FILE *file = NULL;
- file = fopen("_eina_file", "w");
- if (file == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- const char* data = "data";
- ssize_t size = 0;
- Eina_Bool is_set = eina_xattr_set("_eina_file", "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT);
- const char* str = (const char*) eina_xattr_get("_eina_file", "user.mime_type", &size);
-
- if ((is_set == EINA_FALSE) || (str == NULL) || (strcmp(data, str) != 0))
- {
- fclose(file);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- fclose(file);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
-}
-END_TEST
-
-/**
- * @addtogroup eina_xattr_set
- * @{
- * @objective Positive Test case 02: Set the extended attribute on a file.
- * @n Input Data:
- * @li name of the file to set the extended attribute to;
- * @li the attribute to set;
- * @li the data to set;
- * @li the length of the data to set;
- * @li EINA_XATTR_REPLACE as the pararmeter that define the set policy.
- *
- * @procedure
- * @step 1 Create and open the file.
- * @step 2 Create or replace the extended attribute of the file.
- * @step 3 Replace the data of the previously existed extended attribute of the file.
- * @step 4 Retrieve the extended attribute from the file.
- *
- * @passcondition: Test passes if EINA_TRUE is returned, returned and set strings are equal and no segmentation fault.
- * @}
- */
-START_TEST(utc_UIFW_eina_xattr_set_p_2)
-{
- FILE * file = NULL;
- file = fopen("_eina_file", "w");
- if (file == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- const char* data = "data";
- const char* new_data = "new_data";
- ssize_t size = 0;
-
- if (!eina_xattr_set("_eina_file", "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT))
- {
- fclose(file);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- Eina_Bool is_set = eina_xattr_set("_eina_file", "user.mime_type", (const void*) new_data, strlen(new_data) + sizeof(char), EINA_XATTR_REPLACE);
- const char* str = (const char*) eina_xattr_get("_eina_file", "user.mime_type", &size);
-
- if ((is_set == EINA_FALSE) || (str == NULL) || (strcmp(new_data, str) != 0))
- {
- fclose(file);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- fclose(file);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
-}
-END_TEST
-
-/**
- * @addtogroup eina_xattr_set
- * @{
- * @objective Negative Test case 01: Set the extended attribute on NULL as the file.
- * @n Input Data:
- * @li NULL as the name of the file to set the extended attribute to;
- * @li the attribute to set;
- * @li the data to set;
- * @li the length of the data to set;
- * @li EINA_XATTR_INSERT as the pararmeter that define the set policy.
- *
- * @procedure
- * @step 1 Try to set the extended attribute on NULL as the file.
- *
- * @passcondition: Test passes if EINA_FALSE is returned and no segmentation fault.
- * @}
- */
-START_TEST(utc_UIFW_eina_xattr_set_n_1)
-{
-
- const char* data = "data";
-
- if (eina_xattr_set(NULL, "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
-}
-END_TEST
-
-/**
- * @}
- */
-
-TCase * _utc_eina_xattr_set()
-{
- TCase *tcase = tcase_create("utc_eina_xattr_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_UIFW_eina_xattr_set_p_1);
- tcase_add_test(tcase, utc_UIFW_eina_xattr_set_p_2);
- tcase_add_test(tcase, utc_UIFW_eina_xattr_set_n_1);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-#include "../utc_eina_common.h"
-
-/**
- * @addtogroup eina_xattr
- * @{
- * @defgroup eina_xattr_string_get eina_xattr_string_get()
- *
- * @precondition
- * @step 1 Initialize the Eina library.
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_EINA_INIT();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_xattr_string_get
- * @{
- * @objective Positive Test case 01: Get a string from an extended attribute properties of the file.
- * @n Input Data:
- * @li name of the file to get the string from;
- * @li the attribute to get.
- *
- * @procedure
- * @step 1 Create and open the file.
- * @step 2 Create "user.mime_type" extended attribute of the file.
- * @step 3 Set the string for "user.comment" extended attribute properties of the file.
- * @step 4 Get the string from the extended attribute properties of the file.
- * @step 5 Compare set string with returned string.
- *
- * @passcondition: Test passes if returned and set strings are equal and no segmentation fault.
- * @}
- */
-START_TEST(utc_UIFW_eina_xattr_string_get_p_1)
-{
- FILE * file = NULL;
- file = fopen("_eina_file", "w");
- if (file == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- const char* data = "data";
- const char* string = "string";
-
- if (!eina_xattr_set("_eina_file", "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT))
- {
- fclose(file);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- eina_xattr_string_set("_eina_file", "user.comment", string, EINA_XATTR_INSERT);
-
- const char* returned_string = eina_xattr_string_get("_eina_file", "user.comment");
- if ((returned_string != NULL) && (strcmp(returned_string, string) != 0))
- {
- fclose(file);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- fclose(file);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
-}
-END_TEST
-
-/**
- * @addtogroup eina_xattr_string_get
- * @{
- * @objective Negative Test case 01: Get the string from an extended attribute properties of NULL as the file.
- * @n Input Data:
- * @li NULL as the name of the file to get the string from;
- * @li the attribute to get.
- *
- * @procedure
- * @step 1 Try to get the string from an extended attribute properties of NULL as the file.
- *
- * @passcondition: Test passes if NULL is returned and no segmentation fault.
- * @}
- */
-START_TEST(utc_UIFW_eina_xattr_string_get_n_1)
-{
-
- const char* data = NULL;
-
- data = eina_xattr_string_get(NULL, "user.comment");
-
- if (data != 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__);
- return;
-}
-END_TEST
-
-/**
- * @}
- */
-
-TCase * _utc_eina_xattr_string_get()
-{
- TCase *tcase = tcase_create("utc_eina_xattr_string_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_UIFW_eina_xattr_string_get_p_1);
- tcase_add_test(tcase, utc_UIFW_eina_xattr_string_get_n_1);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Eina.h>
+#include "../utc_eina_common.h"
+
+/**
+ * @addtogroup eina_xattr
+ * @{
+ * @defgroup eina_xattr_string_set eina_xattr_string_set()
+ *
+ * @precondition
+ * @step 1 Initialize the Eina library.
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_EINA_INIT();
+}
+
+static void
+teardown(void)
+{
+ printf(" ============ Cleanup ============ \n");
+ eina_shutdown();
+}
+
+/**
+ * @addtogroup eina_xattr_string_set
+ * @{
+ * @objective Positive Test case 01: Set a string as a extended attribute properties of the file.
+ * @n Input Data:
+ * @li name of the file to set the string to;
+ * @li the attribute to set;
+ * @li the NULL-terminated string to set;
+ * @li EINA_XATTR_INSERT as the parameter that define the set policy.
+ *
+ * @procedure
+ * @step 1 Create and open the file.
+ * @step 2 Create "user.mime_type" extended attribute of the file.
+ * @step 3 Set the string for "user.comment" extended attribute properties of the file.
+ * @step 4 Get the string from the "user.comment" extended attribute properties of the file.
+ * @step 5 Compare set string with returned string.
+ *
+ * @passcondition: Test passes if EINA_TRUE is returned, gotten and set strings are equal and no segmentation fault.
+ * @}
+ */
+START_TEST(utc_eina_xattr_string_set_p_1)
+{
+ FILE * file = NULL;
+ file = fopen("_eina_file", "w");
+ if (file == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ const char* data = "data";
+ const char* string = "string";
+
+ if (!eina_xattr_set("_eina_file", "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT))
+ {
+ fclose(file);
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ Eina_Bool is_set = EINA_FALSE;
+ is_set = eina_xattr_string_set("_eina_file", "user.comment", string, EINA_XATTR_INSERT);
+
+ const char* returned_string = eina_xattr_string_get("_eina_file", "user.comment");
+ if ((is_set == EINA_TRUE) && (strcmp(returned_string, string) != 0))
+ {
+ fclose(file);
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ fclose(file);
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+ return;
+}
+END_TEST
+
+/**
+ * @addtogroup eina_xattr_string_set
+ * @{
+ * @objective Negative Test case 01: Get the string from an extended attribute properties of NULL as the file.
+ * @n Input Data:
+ * @li NULL as the name of the file to set the string to;
+ * @li the attribute to set;
+ * @li the NULL-terminated string to set;
+ * @li EINA_XATTR_INSERT as the parameter that define the set policy.
+ *
+ * @procedure
+ * @step 1 Try to set the string as an extended attribute properties of NULL as the file.
+ *
+ * @passcondition: Test passes if EINA_FALSE is returned and no segmentation fault.
+ * @}
+ */
+START_TEST(utc_eina_xattr_string_set_n_1)
+{
+ const char* str = "string";
+
+ if (eina_xattr_string_set(NULL, "user.comment", str, EINA_XATTR_INSERT))
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+ return;
+}
+END_TEST
+
+/**
+ * @addtogroup eina_xattr_string_get
+ * @{
+ * @objective Negative Test case 01: Get the string from an extended attribute properties of NULL as the file.
+ * @n Input Data:
+ * @li NULL as the name of the file to get the string from;
+ * @li the attribute to get.
+ *
+ * @procedure
+ * @step 1 Try to get the string from an extended attribute properties of NULL as the file.
+ *
+ * @passcondition: Test passes if NULL is returned and no segmentation fault.
+ * @}
+ */
+START_TEST(utc_eina_xattr_string_get_n_1)
+{
+
+ const char* data = NULL;
+
+ data = eina_xattr_string_get(NULL, "user.comment");
+
+ if (data != NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+ return;
+}
+END_TEST
+
+/**
+ * @}
+ */
+
+TCase * _utc_eina_xattr_string_get_set()
+{
+ TCase *tcase = tcase_create("utc_eina_xattr_string_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_eina_xattr_string_set_p_1);
+ tcase_add_test(tcase, utc_eina_xattr_string_set_n_1);
+ tcase_add_test(tcase, utc_eina_xattr_string_get_n_1);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Eina.h>
-#include "../utc_eina_common.h"
-
-/**
- * @addtogroup eina_xattr
- * @{
- * @defgroup eina_xattr_string_set eina_xattr_string_set()
- *
- * @precondition
- * @step 1 Initialize the Eina library.
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_EINA_INIT();
-}
-
-static void
-teardown(void)
-{
- printf(" ============ Cleanup ============ \n");
- eina_shutdown();
-}
-
-/**
- * @addtogroup eina_xattr_string_set
- * @{
- * @objective Positive Test case 01: Set a string as a extended attribute properties of the file.
- * @n Input Data:
- * @li name of the file to set the string to;
- * @li the attribute to set;
- * @li the NULL-terminated string to set;
- * @li EINA_XATTR_INSERT as the parameter that define the set policy.
- *
- * @procedure
- * @step 1 Create and open the file.
- * @step 2 Create "user.mime_type" extended attribute of the file.
- * @step 3 Set the string for "user.comment" extended attribute properties of the file.
- * @step 4 Get the string from the "user.comment" extended attribute properties of the file.
- * @step 5 Compare set string with returned string.
- *
- * @passcondition: Test passes if EINA_TRUE is returned, gotten and set strings are equal and no segmentation fault.
- * @}
- */
-START_TEST(utc_UIFW_eina_xattr_string_set_p_1)
-{
- FILE * file = NULL;
- file = fopen("_eina_file", "w");
- if (file == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- const char* data = "data";
- const char* string = "string";
-
- if (!eina_xattr_set("_eina_file", "user.mime_type", (const void*) data, strlen(data) + sizeof(char), EINA_XATTR_INSERT))
- {
- fclose(file);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- Eina_Bool is_set = EINA_FALSE;
- is_set = eina_xattr_string_set("_eina_file", "user.comment", string, EINA_XATTR_INSERT);
-
- const char* returned_string = eina_xattr_string_get("_eina_file", "user.comment");
- if ((is_set == EINA_TRUE) && (strcmp(returned_string, string) != 0))
- {
- fclose(file);
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- fclose(file);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
-}
-END_TEST
-
-/**
- * @addtogroup eina_xattr_string_set
- * @{
- * @objective Negative Test case 01: Get the string from an extended attribute properties of NULL as the file.
- * @n Input Data:
- * @li NULL as the name of the file to set the string to;
- * @li the attribute to set;
- * @li the NULL-terminated string to set;
- * @li EINA_XATTR_INSERT as the parameter that define the set policy.
- *
- * @procedure
- * @step 1 Try to set the string as an extended attribute properties of NULL as the file.
- *
- * @passcondition: Test passes if EINA_FALSE is returned and no segmentation fault.
- * @}
- */
-START_TEST(utc_UIFW_eina_xattr_string_set_n_1)
-{
- const char* str = "string";
-
- if (eina_xattr_string_set(NULL, "user.comment", str, EINA_XATTR_INSERT))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- return;
-}
-END_TEST
-
-/**
- * @}
- */
-
-TCase * _utc_eina_xattr_string_set()
-{
- TCase *tcase = tcase_create("utc_eina_xattr_string_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_UIFW_eina_xattr_string_set_p_1);
- tcase_add_test(tcase, utc_UIFW_eina_xattr_string_set_n_1);
- return tcase;
-}