22 #define __func__ __FUNCTION__ 25 #define inline __inline 59 # if defined(__x86_64__) && !defined(__ILP32__) 60 # define __WORDSIZE 64 62 # define __WORDSIZE 32 73 #ifndef LargestIntegralType 75 # define LargestIntegralType unsigned long int 77 # define LargestIntegralType unsigned long long int 83 #ifndef LargestIntegralTypePrintfFormat 85 # define LargestIntegralTypePrintfFormat "0x%I64x" 88 # define LargestIntegralTypePrintfFormat "%#lx" 90 # define LargestIntegralTypePrintfFormat "%#llx" 96 #define cast_to_largest_integral_type(value) \ 97 ((LargestIntegralType)(value)) 100 #if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED) 104 # elif defined(_WIN64) 110 # if __WORDSIZE == 64 116 # if defined(_LP64) || defined(_I32LPx) 125 # define _UINTPTR_T_DEFINED 129 #define cast_to_pointer_integral_type(value) \ 130 ((uintptr_t)((size_t)(value))) 133 #define cast_ptr_to_largest_integral_type(value) \ 134 cast_to_largest_integral_type(cast_to_pointer_integral_type(value)) 138 #define CMOCKA_PRINTF_ATTRIBUTE(a,b) \ 139 __attribute__ ((__format__ (__printf__, a, b))) 141 #define CMOCKA_PRINTF_ATTRIBUTE(a,b) 144 #if defined(__GNUC__) 145 #define CMOCKA_DEPRECATED __attribute__ ((deprecated)) 146 #elif defined(_MSC_VER) 147 #define CMOCKA_DEPRECATED __declspec(deprecated) 149 #define CMOCKA_DEPRECATED 210 #define mock() _mock(__func__, __FILE__, __LINE__) 234 #type mock_type(#type); 236 #define mock_type(type) ((type) mock()) 263 #define mock_ptr_type(type) ((type) (uintptr_t) mock()) 294 #define will_return(function, value) \ 295 _will_return(#function, __FILE__, __LINE__, \ 296 cast_to_largest_integral_type(value), 1) 317 #define will_return_count(function, value, count) \ 318 _will_return(#function, __FILE__, __LINE__, \ 319 cast_to_largest_integral_type(value), count) 340 #define will_return_always(function, value) \ 341 will_return_count(function, (value), -1) 368 #define will_return_maybe(function, value) \ 369 will_return_count(function, (value), -2) 440 void expect_check(#
function, #parameter, #check_function,
const void *check_data);
442 #define expect_check(function, parameter, check_function, check_data) \ 443 _expect_check(#function, #parameter, __FILE__, __LINE__, check_function, \ 444 cast_to_largest_integral_type(check_data), NULL, 1) 464 #define expect_in_set(function, parameter, value_array) \ 465 expect_in_set_count(function, parameter, value_array, 1) 489 #define expect_in_set_count(function, parameter, value_array, count) \ 490 _expect_in_set(#function, #parameter, __FILE__, __LINE__, value_array, \ 491 sizeof(value_array) / sizeof((value_array)[0]), count) 511 #define expect_not_in_set(function, parameter, value_array) \ 512 expect_not_in_set_count(function, parameter, value_array, 1) 536 #define expect_not_in_set_count(function, parameter, value_array, count) \ 537 _expect_not_in_set( \ 538 #function, #parameter, __FILE__, __LINE__, value_array, \ 539 sizeof(value_array) / sizeof((value_array)[0]), count) 562 #define expect_in_range(function, parameter, minimum, maximum) \ 563 expect_in_range_count(function, parameter, minimum, maximum, 1) 589 #define expect_in_range_count(function, parameter, minimum, maximum, count) \ 590 _expect_in_range(#function, #parameter, __FILE__, __LINE__, minimum, \ 613 #define expect_not_in_range(function, parameter, minimum, maximum) \ 614 expect_not_in_range_count(function, parameter, minimum, maximum, 1) 640 #define expect_not_in_range_count(function, parameter, minimum, maximum, \ 642 _expect_not_in_range(#function, #parameter, __FILE__, __LINE__, \ 643 minimum, maximum, count) 662 #define expect_value(function, parameter, value) \ 663 expect_value_count(function, parameter, value, 1) 686 #define expect_value_count(function, parameter, value, count) \ 687 _expect_value(#function, #parameter, __FILE__, __LINE__, \ 688 cast_to_largest_integral_type(value), count) 707 #define expect_not_value(function, parameter, value) \ 708 expect_not_value_count(function, parameter, value, 1) 731 #define expect_not_value_count(function, parameter, value, count) \ 732 _expect_not_value(#function, #parameter, __FILE__, __LINE__, \ 733 cast_to_largest_integral_type(value), count) 751 void expect_string(#
function, #parameter,
const char *
string);
753 #define expect_string(function, parameter, string) \ 754 expect_string_count(function, parameter, string, 1) 778 #define expect_string_count(function, parameter, string, count) \ 779 _expect_string(#function, #parameter, __FILE__, __LINE__, \ 780 (const char*)(string), count) 800 #define expect_not_string(function, parameter, string) \ 801 expect_not_string_count(function, parameter, string, 1) 825 #define expect_not_string_count(function, parameter, string, count) \ 826 _expect_not_string(#function, #parameter, __FILE__, __LINE__, \ 827 (const char*)(string), count) 846 void expect_memory(#
function, #parameter,
void *memory,
size_t size);
848 #define expect_memory(function, parameter, memory, size) \ 849 expect_memory_count(function, parameter, memory, size, 1) 875 #define expect_memory_count(function, parameter, memory, size, count) \ 876 _expect_memory(#function, #parameter, __FILE__, __LINE__, \ 877 (const void*)(memory), size, count) 899 #define expect_not_memory(function, parameter, memory, size) \ 900 expect_not_memory_count(function, parameter, memory, size, 1) 926 #define expect_not_memory_count(function, parameter, memory, size, count) \ 927 _expect_not_memory(#function, #parameter, __FILE__, __LINE__, \ 928 (const void*)(memory), size, count) 946 #define expect_any(function, parameter) \ 947 expect_any_count(function, parameter, 1) 969 #define expect_any_count(function, parameter, count) \ 970 _expect_any(#function, #parameter, __FILE__, __LINE__, count) 986 #define check_expected(parameter) \ 987 _check_expected(__func__, #parameter, __FILE__, __LINE__, \ 988 cast_to_largest_integral_type(parameter)) 1004 #define check_expected_ptr(parameter) \ 1005 _check_expected(__func__, #parameter, __FILE__, __LINE__, \ 1006 cast_ptr_to_largest_integral_type(parameter)) 1045 #define assert_true(c) _assert_true(cast_to_largest_integral_type(c), #c, \ 1063 #define assert_false(c) _assert_true(!(cast_to_largest_integral_type(c)), #c, \ 1082 #define assert_return_code(rc, error) \ 1083 _assert_return_code(cast_to_largest_integral_type(rc), \ 1085 cast_to_largest_integral_type(error), \ 1086 #rc, __FILE__, __LINE__) 1102 #define assert_non_null(c) _assert_true(cast_ptr_to_largest_integral_type(c), #c, \ 1119 #define assert_null(c) _assert_true(!(cast_ptr_to_largest_integral_type(c)), #c, \ 1136 #define assert_ptr_equal(a, b) \ 1137 _assert_int_equal(cast_ptr_to_largest_integral_type(a), \ 1138 cast_ptr_to_largest_integral_type(b), \ 1155 #define assert_ptr_not_equal(a, b) \ 1156 _assert_int_not_equal(cast_ptr_to_largest_integral_type(a), \ 1157 cast_ptr_to_largest_integral_type(b), \ 1174 #define assert_int_equal(a, b) \ 1175 _assert_int_equal(cast_to_largest_integral_type(a), \ 1176 cast_to_largest_integral_type(b), \ 1195 #define assert_int_not_equal(a, b) \ 1196 _assert_int_not_equal(cast_to_largest_integral_type(a), \ 1197 cast_to_largest_integral_type(b), \ 1214 #define assert_string_equal(a, b) \ 1215 _assert_string_equal((const char*)(a), (const char*)(b), __FILE__, \ 1232 #define assert_string_not_equal(a, b) \ 1233 _assert_string_not_equal((const char*)(a), (const char*)(b), __FILE__, \ 1254 #define assert_memory_equal(a, b, size) \ 1255 _assert_memory_equal((const void*)(a), (const void*)(b), size, __FILE__, \ 1276 #define assert_memory_not_equal(a, b, size) \ 1277 _assert_memory_not_equal((const void*)(a), (const void*)(b), size, \ 1297 #define assert_in_range(value, minimum, maximum) \ 1299 cast_to_largest_integral_type(value), \ 1300 cast_to_largest_integral_type(minimum), \ 1301 cast_to_largest_integral_type(maximum), __FILE__, __LINE__) 1320 #define assert_not_in_range(value, minimum, maximum) \ 1321 _assert_not_in_range( \ 1322 cast_to_largest_integral_type(value), \ 1323 cast_to_largest_integral_type(minimum), \ 1324 cast_to_largest_integral_type(maximum), __FILE__, __LINE__) 1342 #define assert_in_set(value, values, number_of_values) \ 1343 _assert_in_set(value, values, number_of_values, __FILE__, __LINE__) 1361 #define assert_not_in_set(value, values, number_of_values) \ 1362 _assert_not_in_set(value, values, number_of_values, __FILE__, __LINE__) 1434 #define function_called() _function_called(__func__, __FILE__, __LINE__) 1450 #define expect_function_calls(function, times) \ 1451 _expect_function_call(#function, __FILE__, __LINE__, times) 1465 #define expect_function_call(function) \ 1466 _expect_function_call(#function, __FILE__, __LINE__, 1) 1479 #define expect_function_call_any(function) \ 1480 _expect_function_call(#function, __FILE__, __LINE__, -1) 1493 #define ignore_function_calls(function) \ 1494 _expect_function_call(#function, __FILE__, __LINE__, -2) 1531 #define fail() _fail(__FILE__, __LINE__) 1540 #define skip() _skip(__FILE__, __LINE__) 1560 #define fail_msg(msg, ...) do { \ 1561 print_error("ERROR: " msg "\n", ##__VA_ARGS__); \ 1588 #define run_test(f) _run_test(#f, f, NULL, UNIT_TEST_FUNCTION_TYPE_TEST, NULL) 1599 #define unit_test(f) { #f, f, UNIT_TEST_FUNCTION_TYPE_TEST } 1601 #define _unit_test_setup(test, setup) \ 1602 { #test "_" #setup, setup, UNIT_TEST_FUNCTION_TYPE_SETUP } 1608 #define unit_test_setup(test, setup) \ 1609 _unit_test_setup(test, setup), \ 1611 _unit_test_teardown(test, _unit_test_dummy) 1613 #define _unit_test_teardown(test, teardown) \ 1614 { #test "_" #teardown, teardown, UNIT_TEST_FUNCTION_TYPE_TEARDOWN } 1620 #define unit_test_teardown(test, teardown) \ 1621 _unit_test_setup(test, _unit_test_dummy), \ 1623 _unit_test_teardown(test, teardown) 1629 #define group_test_setup(setup) \ 1630 { "group_" #setup, setup, UNIT_TEST_FUNCTION_TYPE_GROUP_SETUP } 1636 #define group_test_teardown(teardown) \ 1637 { "group_" #teardown, teardown, UNIT_TEST_FUNCTION_TYPE_GROUP_TEARDOWN } 1646 #define unit_test_setup_teardown(test, setup, teardown) \ 1647 _unit_test_setup(test, setup), \ 1649 _unit_test_teardown(test, teardown) 1653 #define cmocka_unit_test(f) { #f, f, NULL, NULL, NULL } 1656 #define cmocka_unit_test_setup(f, setup) { #f, f, setup, NULL, NULL } 1659 #define cmocka_unit_test_teardown(f, teardown) { #f, f, NULL, teardown, NULL } 1665 #define cmocka_unit_test_setup_teardown(f, setup, teardown) { #f, f, setup, teardown, NULL } 1674 #define cmocka_unit_test_prestate(f, state) { #f, f, NULL, NULL, state } 1683 #define cmocka_unit_test_prestate_setup_teardown(f, setup, teardown, state) { #f, f, setup, teardown, state } 1685 #define run_tests(tests) _run_tests(tests, sizeof(tests) / sizeof(tests)[0]) 1686 #define run_group_tests(tests) _run_group_tests(tests, sizeof(tests) / sizeof(tests)[0]) 1749 # define cmocka_run_group_tests(group_tests, group_setup, group_teardown) \ 1750 _cmocka_run_group_tests(#group_tests, group_tests, sizeof(group_tests) / sizeof(group_tests)[0], group_setup, group_teardown) 1818 # define cmocka_run_group_tests_name(group_name, group_tests, group_setup, group_teardown) \ 1819 _cmocka_run_group_tests(group_name, group_tests, sizeof(group_tests) / sizeof(group_tests)[0], group_setup, group_teardown) 1872 #define test_malloc(size) _test_malloc(size, __FILE__, __LINE__) 1891 #define test_calloc(num, size) _test_calloc(num, size, __FILE__, __LINE__) 1907 #define test_realloc(ptr, size) _test_realloc(ptr, size, __FILE__, __LINE__) 1920 #define test_free(ptr) _test_free(ptr, __FILE__, __LINE__) 1925 #define malloc test_malloc 1926 #define realloc test_realloc 1927 #define calloc test_calloc 1928 #define free test_free 1984 void mock_assert(
const int result,
const char*
const expression,
1985 const char *
const file,
const int line);
2012 #define expect_assert_failure(function_call) \ 2014 const int result = setjmp(global_expect_assert_env); \ 2015 global_expecting_assert = 1; \ 2017 print_message("Expected assertion %s occurred\n", \ 2018 global_last_failed_assert); \ 2019 global_expecting_assert = 0; \ 2022 global_expecting_assert = 0; \ 2023 print_error("Expected assert in %s\n", #function_call); \ 2024 _fail(__FILE__, __LINE__); \ 2103 const char *
const function_name,
2104 const char *
const file,
2112 const char*
const function,
const char*
const parameter,
2113 const char*
const file,
const int line,
2119 const char*
const function,
const char*
const parameter,
2121 const size_t number_of_values,
const int count);
2123 const char*
const function,
const char*
const parameter,
2125 const size_t number_of_values,
const int count);
2128 const char*
const function,
const char*
const parameter,
2129 const char*
const file,
const int line,
2133 const char*
const function,
const char*
const parameter,
2134 const char*
const file,
const int line,
2139 const char*
const function,
const char*
const parameter,
2143 const char*
const function,
const char*
const parameter,
2148 const char*
const function,
const char*
const parameter,
2149 const char*
const file,
const int line,
const char*
string,
2152 const char*
const function,
const char*
const parameter,
2153 const char*
const file,
const int line,
const char*
string,
2157 const char*
const function,
const char*
const parameter,
2158 const char*
const file,
const int line,
const void*
const memory,
2159 const size_t size,
const int count);
2161 const char*
const function,
const char*
const parameter,
2162 const char*
const file,
const int line,
const void*
const memory,
2163 const size_t size,
const int count);
2166 const char*
const function,
const char*
const parameter,
2167 const char*
const file,
const int line,
const int count);
2170 const char *
const function_name,
const char *
const parameter_name,
2173 void _will_return(
const char *
const function_name,
const char *
const file,
2177 const char*
const expression,
2178 const char *
const file,
const int line);
2182 const char *
const expression,
2183 const char *
const file,
2187 const char *
const file,
const int line);
2190 const char *
const file,
const int line);
2192 const char *
const file,
const int line);
2194 const char *file,
const int line);
2196 const size_t size,
const char*
const file,
2199 const size_t size,
const char*
const file,
2209 const size_t number_of_values,
const char*
const file,
const int line);
2212 const size_t number_of_values,
const char*
const file,
const int line);
2214 void*
_test_malloc(
const size_t size,
const char* file,
const int line);
2215 void*
_test_realloc(
void *ptr,
const size_t size,
const char* file,
const int line);
2216 void*
_test_calloc(
const size_t number_of_elements,
const size_t size,
2217 const char* file,
const int line);
2218 void _test_free(
void*
const ptr,
const char* file,
const int line);
2220 void _fail(
const char *
const file,
const int line);
2222 void _skip(
const char *
const file,
const int line);
2227 const void*
const heap_check_point);
2229 const size_t number_of_tests);
2231 const size_t number_of_tests);
2236 const size_t num_tests,
2243 void vprint_message(const
char* const format, va_list args) CMOCKA_PRINTF_ATTRIBUTE(1, 0);
2244 void vprint_error(const
char* const format, va_list args) CMOCKA_PRINTF_ATTRIBUTE(1, 0);
struct CheckParameterEvent CheckParameterEvent
#define expect_not_in_set_count(function, parameter, value_array, count)
void _assert_memory_equal(const void *const a, const void *const b, const size_t size, const char *const file, const int line)
#define assert_non_null(c)
#define expect_in_range(function, parameter, minimum, maximum)
#define expect_memory_count(function, parameter, memory, size, count)
CheckParameterValue check_value
#define assert_return_code(rc, error)
CMFixtureFunction setup_func
#define expect_not_in_set(function, parameter, value_array)
void _expect_not_memory(const char *const function, const char *const parameter, const char *const file, const int line, const void *const memory, const size_t size, const int count)
#define test_calloc(num, size)
void(* CMUnitTestFunction)(void **state)
struct GroupTest GroupTest
#define assert_not_in_set(value, values, number_of_values)
#define expect_not_memory(function, parameter, memory, size)
#define expect_not_in_range(function, parameter, minimum, maximum)
void _assert_int_equal(const LargestIntegralType a, const LargestIntegralType b, const char *const file, const int line)
int(* CheckParameterValue)(const LargestIntegralType value, const LargestIntegralType check_value_data)
#define expect_in_set(function, parameter, value_array)
#define will_return_maybe(function, value)
#define expect_not_string(function, parameter, string)
#define assert_ptr_equal(a, b)
UnitTestFunction teardown
int _run_test(const char *const function_name, const UnitTestFunction Function, void **const volatile state, const UnitTestFunctionType function_type, const void *const heap_check_point)
void _expect_not_string(const char *const function, const char *const parameter, const char *const file, const int line, const char *string, const int count)
#define fail_msg(msg,...)
void _assert_memory_not_equal(const void *const a, const void *const b, const size_t size, const char *const file, const int line)
void mock_assert(const int result, const char *const expression, const char *const file, const int line)
Function to replace assert(3) in tested code.
void void void void vprint_error(const char *const format, va_list args) CMOCKA_PRINTF_ATTRIBUTE(1
#define test_realloc(ptr, size)
#define expect_not_string_count(function, parameter, string, count)
#define expect_value(function, parameter, value)
void void print_error(const char *const format,...) CMOCKA_PRINTF_ATTRIBUTE(1
LargestIntegralType check_value_data
void _expect_any(const char *const function, const char *const parameter, const char *const file, const int line, const int count)
CMUnitTestFunction test_func
#define expect_function_calls(function, times)
#define CMOCKA_PRINTF_ATTRIBUTE(a, b)
static void _unit_test_dummy(void **state)
void _expect_string(const char *const function, const char *const parameter, const char *const file, const int line, const char *string, const int count)
#define expect_in_set_count(function, parameter, value_array, count)
#define expect_not_value(function, parameter, value)
void _will_return(const char *const function_name, const char *const file, const int line, const LargestIntegralType value, const int count)
static int group_teardown(void **state)
#define cmocka_run_group_tests_name(group_name, group_tests, group_setup, group_teardown)
#define assert_int_not_equal(a, b)
CMOCKA_DEPRECATED int _run_group_tests(const UnitTest *const tests, const size_t number_of_tests)
#define assert_string_equal(a, b)
void _expect_memory(const char *const function, const char *const parameter, const char *const file, const int line, const void *const memory, const size_t size, const int count)
void _expect_not_in_range(const char *const function, const char *const parameter, const char *const file, const int line, const LargestIntegralType minimum, const LargestIntegralType maximum, const int count)
void _test_free(void *const ptr, const char *file, const int line)
#define assert_not_in_range(value, minimum, maximum)
#define assert_memory_equal(a, b, size)
#define will_return_count(function, value, count)
#define expect_check(function, parameter, check_function, check_data)
void _fail(const char *const file, const int line)
CMOCKA_DEPRECATED int _run_tests(const UnitTest *const tests, const size_t number_of_tests)
#define expect_function_call_any(function)
#define expect_any(function, parameter)
#define expect_memory(function, parameter, memory, size)
void * _test_malloc(const size_t size, const char *file, const int line)
int global_expecting_assert
#define expect_string_count(function, parameter, string, count)
void _assert_in_range(const LargestIntegralType value, const LargestIntegralType minimum, const LargestIntegralType maximum, const char *const file, const int line)
#define function_called()
jmp_buf global_expect_assert_env
WINBASEAPI BOOL WINAPI IsDebuggerPresent(VOID)
#define LargestIntegralType
void _assert_return_code(const LargestIntegralType result, size_t rlen, const LargestIntegralType error, const char *const expression, const char *const file, const int line)
void _assert_not_in_set(const LargestIntegralType value, const LargestIntegralType values[], const size_t number_of_values, const char *const file, const int line)
#define will_return_always(function, value)
void _function_called(const char *const function, const char *const file, const int line)
const size_t number_of_tests
void _expect_check(const char *const function, const char *const parameter, const char *const file, const int line, const CheckParameterValue check_function, const LargestIntegralType check_data, CheckParameterEvent *const event, const int count)
void _expect_in_range(const char *const function, const char *const parameter, const char *const file, const int line, const LargestIntegralType minimum, const LargestIntegralType maximum, const int count)
struct SourceLocation SourceLocation
#define expect_value_count(function, parameter, value, count)
void _assert_string_equal(const char *const a, const char *const b, const char *const file, const int line)
#define will_return(function, value)
#define expect_function_call(function)
int(* CMFixtureFunction)(void **state)
#define expect_any_count(function, parameter, count)
void print_message(const char *const format,...) CMOCKA_PRINTF_ATTRIBUTE(1
#define CMOCKA_DEPRECATED
#define expect_not_in_range_count(function, parameter, minimum, maximum, count)
void _expect_in_set(const char *const function, const char *const parameter, const char *const file, const int line, const LargestIntegralType values[], const size_t number_of_values, const int count)
const char * global_last_failed_assert
#define check_expected(parameter)
LargestIntegralType _mock(const char *const function, const char *const file, const int line)
void _expect_function_call(const char *const function_name, const char *const file, const int line, const int count)
void _assert_not_in_range(const LargestIntegralType value, const LargestIntegralType minimum, const LargestIntegralType maximum, const char *const file, const int line)
#define cmocka_run_group_tests(group_tests, group_setup, group_teardown)
CMFixtureFunction teardown_func
#define assert_ptr_not_equal(a, b)
void _skip(const char *const file, const int line)
void void void vprint_message(const char *const format, va_list args) CMOCKA_PRINTF_ATTRIBUTE(1
void cmocka_set_message_output(enum cm_message_output output)
Function to set the output format for a test.
const char * parameter_name
void * _test_calloc(const size_t number_of_elements, const size_t size, const char *file, const int line)
#define test_malloc(size)
#define assert_memory_not_equal(a, b, size)
#define expect_not_memory_count(function, parameter, memory, size, count)
#define assert_string_not_equal(a, b)
void _expect_not_in_set(const char *const function, const char *const parameter, const char *const file, const int line, const LargestIntegralType values[], const size_t number_of_values, const int count)
#define expect_not_value_count(function, parameter, value, count)
void _check_expected(const char *const function_name, const char *const parameter_name, const char *file, const int line, const LargestIntegralType value)
void _expect_not_value(const char *const function, const char *const parameter, const char *const file, const int line, const LargestIntegralType value, const int count)
void _assert_string_not_equal(const char *const a, const char *const b, const char *file, const int line)
#define mock_ptr_type(type)
void _assert_true(const LargestIntegralType result, const char *const expression, const char *const file, const int line)
#define assert_in_range(value, minimum, maximum)
void _expect_value(const char *const function, const char *const parameter, const char *const file, const int line, const LargestIntegralType value, const int count)
#define expect_in_range_count(function, parameter, minimum, maximum, count)
#define check_expected_ptr(parameter)
UnitTestFunctionType function_type
void(* UnitTestFunction)(void **state)
void * _test_realloc(void *ptr, const size_t size, const char *file, const int line)
static int group_setup(void **state)
#define assert_in_set(value, values, number_of_values)
void _assert_in_set(const LargestIntegralType value, const LargestIntegralType values[], const size_t number_of_values, const char *const file, const int line)
#define expect_assert_failure(function_call)
void _assert_int_not_equal(const LargestIntegralType a, const LargestIntegralType b, const char *const file, const int line)
#define expect_string(function, parameter, string)
#define assert_int_equal(a, b)
#define ignore_function_calls(function)
int _cmocka_run_group_tests(const char *group_name, const struct CMUnitTest *const tests, const size_t num_tests, CMFixtureFunction group_setup, CMFixtureFunction group_teardown)