tests/mctest.h: indentation.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2022-12-30 10:42:27 +03:00
parent fad7029502
commit 6f352854fa
1 changed files with 12 additions and 9 deletions

View File

@ -9,7 +9,7 @@
/*** typedefs(not structures) and defined constants **********************************************/
#define mctest_add_parameterized_test(tc_core, test_func, test_data_source) {\
#define mctest_add_parameterized_test(tc_core, test_func, test_data_source) { \
tcase_add_loop_test (tc_core, test_func, 0, G_N_ELEMENTS (test_data_source)); \
}
@ -21,39 +21,39 @@
ck_assert_msg ( actual_pointer == etalon_pointer, \
"%s(%p) pointer should be equal to %s(%p)\n", \
#actual_pointer, actual_pointer, #etalon_pointer , etalon_pointer \
);\
); \
}
#define mctest_assert_ptr_ne(actual_pointer, etalon_pointer) { \
ck_assert_msg ( actual_pointer != etalon_pointer, \
"%s(%p) pointer should not be equal to %s(%p)\n", \
#actual_pointer, actual_pointer, #etalon_pointer , etalon_pointer \
);\
); \
}
#define mctest_assert_null(actual_pointer) { \
ck_assert_msg( \
ck_assert_msg ( \
(void *) actual_pointer == NULL, \
"%s(%p) variable should be NULL", #actual_pointer, actual_pointer \
); \
}
#define mctest_assert_not_null(actual_pointer) { \
ck_assert_msg( \
ck_assert_msg ( \
(void *) actual_pointer != NULL, \
"%s(nil) variable should not be NULL", #actual_pointer \
); \
}
#define mctest_assert_true(actual_pointer) { \
ck_assert_msg( \
ck_assert_msg ( \
(int) actual_pointer != 0, \
"%s variable should be TRUE", #actual_pointer \
); \
}
#define mctest_assert_false(actual_pointer) { \
ck_assert_msg( \
ck_assert_msg ( \
(int) actual_pointer == 0, \
"%s variable should be FALSE", #actual_pointer \
); \
@ -63,12 +63,15 @@
* Define header for a parameterized test.
* Declare 'data' variable for access to the parameters in current iteration
*/
#define START_PARAMETRIZED_TEST(name_test, struct_name) START_TEST (name_test) { const struct struct_name *data = &struct_name[_i];
#define START_PARAMETRIZED_TEST(name_test, struct_name) \
START_TEST (name_test) { \
const struct struct_name *data = &struct_name[_i];
/**
* Define footer for a parameterized test.
*/
#define END_PARAMETRIZED_TEST } END_TEST
#define END_PARAMETRIZED_TEST \
} END_TEST
/*** enums ***************************************************************************************/