From b0d619e2c9595f4ec05463e87be9d0d3423c0a70 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Fri, 22 Aug 2025 15:27:17 +0300 Subject: use covsrv for coverage testing --- tests/test.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/test.h (limited to 'tests/test.h') diff --git a/tests/test.h b/tests/test.h new file mode 100644 index 0000000..2fa0879 --- /dev/null +++ b/tests/test.h @@ -0,0 +1,12 @@ +#ifndef TEST_H +#define TEST_H + +#include + +#define cover_ptr(name, ...) ({covsrv_die() ? NULL : name (__VA_ARGS__);}) + +#define mallocc(...) cover_ptr(malloc, __VA_ARGS__) +#define callocc(...) cover_ptr(calloc, __VA_ARGS__) +#define reallocc(...) cover_ptr(realloc, __VA_ARGS__) + +#endif /* TEST_H */ -- cgit v1.2.3