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, \
13 sizeof (test_data_source) / sizeof (test_data_source[0])); \
16 #define mctest_assert_str_eq(actual_result, etalon_result) { \
17 g_assert_cmpstr (actual_result, ==, etalon_result); \
20 #define mctest_assert_int_eq(actual_result, etalon_result) { \
21 ck_assert_int_eq (actual_result, etalon_result); \
24 #define mctest_assert_int_ne(actual_result, etalon_result) { \
25 ck_assert_int_ne (actual_result, etalon_result); \
28 #define mctest_assert_ptr_eq(actual_pointer, etalon_pointer) { \
29 fail_unless ( actual_pointer == etalon_pointer, \
30 "%s(%p) pointer should be equal to %s(%p)\n", \
31 #actual_pointer, actual_pointer, #etalon_pointer , etalon_pointer \
35 #define mctest_assert_ptr_ne(actual_pointer, etalon_pointer) { \
36 fail_unless ( actual_pointer != etalon_pointer, \
37 "%s(%p) pointer should not be equal to %s(%p)\n", \
38 #actual_pointer, actual_pointer, #etalon_pointer , etalon_pointer \
42 #define mctest_assert_null(actual_pointer) { \
44 (void *) actual_pointer == NULL, \
45 "%s(%p) variable should be NULL", #actual_pointer, actual_pointer \
49 #define mctest_assert_not_null(actual_pointer) { \
51 (void *) actual_pointer == NULL, \
52 "%s(nil) variable should not be NULL", #actual_pointer \
57 * Define header for a parameterized test.
58 * Declare 'data' variable for access to the parameters in current iteration
60 #define START_PARAMETRIZED_TEST(name_test, struct_name) START_TEST (name_test) { const struct struct_name *data = &struct_name[_i];
63 * Define footer for a parameterized test.
65 #define END_PARAMETRIZED_TEST } END_TEST
67 /*** enums ***************************************************************************************/
69 /*** structures declarations (and typedefs of structures)*****************************************/
71 /*** global variables defined in .c file *********************************************************/
73 /*** declarations of public functions ************************************************************/
75 /*** inline functions ****************************************************************************/