4.3 Mocking Framework
/* Mock function type */
typedef struct {
const char *name;
void *original_func;
void *mock_func;
bool enabled;
} d3tui_mock_t;
/* Mock a function */
void d3tui_mock_function(const char *name, void *mock_func, void *original_func);
/* Unmock a function */
void d3tui_unmock_function(const char *name);
/* Check if a function was called */
bool d3tui_mock_was_called(const char *name);
/* Get call count */
int d3tui_mock_get_call_count(const char *name);
/* Get call arguments */
void *d3tui_mock_get_call_args(const char *name, int call_index);
/* Reset mock */
void d3tui_mock_reset(const char *name);