7 #include "lib/global.h"
9 /*** typedefs(not structures) and defined constants **********************************************/
11 #define mctest_add_parameterized_test(tc_core, test_func, test_data_source) {\
12 tcase_add_loop_test (tc_core, test_func, 0, G_N_ELEMENTS (test_data_source)); \
15 #define mctest_assert_str_eq(actual_result, etalon_result) { \
16 g_assert_cmpstr (actual_result, ==, etalon_result); \
19 #define mctest_assert_int_eq(actual_result, etalon_result) { \
20 ck_assert_int_eq (actual_result, etalon_result); \
23 #define mctest_assert_int_ne(actual_result, etalon_result) { \
24 ck_assert_int_ne (actual_result, etalon_result); \
27 #define mctest_assert_ptr_eq(actual_pointer, etalon_pointer) { \
28 fail_unless ( actual_pointer == etalon_pointer, \
29 "%s(%p) pointer should be equal to %s(%p)\n", \
30 #actual_pointer, actual_pointer, #etalon_pointer , etalon_pointer \
34 #define mctest_assert_ptr_ne(actual_pointer, etalon_pointer) { \
35 fail_unless ( actual_pointer != etalon_pointer, \
36 "%s(%p) pointer should not be equal to %s(%p)\n", \
37 #actual_pointer, actual_pointer, #etalon_pointer , etalon_pointer \
41 #define mctest_assert_null(actual_pointer) { \
43 (void *) actual_pointer == NULL, \
44 "%s(%p) variable should be NULL", #actual_pointer, actual_pointer \
48 #define mctest_assert_not_null(actual_pointer) { \
50 (void *) actual_pointer == NULL, \
51 "%s(nil) variable should not be NULL", #actual_pointer \
56 * Define header for a parameterized test.
57 * Declare 'data' variable for access to the parameters in current iteration
59 #define START_PARAMETRIZED_TEST(name_test, struct_name) START_TEST (name_test) { const struct struct_name *data = &struct_name[_i];
62 * Define footer for a parameterized test.
64 #define END_PARAMETRIZED_TEST } END_TEST
66 /*** enums ***************************************************************************************/
68 /*** structures declarations (and typedefs of structures)*****************************************/
70 /*** global variables defined in .c file *********************************************************/
72 /*** declarations of public functions ************************************************************/
74 /*** inline functions ****************************************************************************/