diff options
author | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-08-22 15:27:17 +0300 |
---|---|---|
committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-08-22 15:27:17 +0300 |
commit | b0d619e2c9595f4ec05463e87be9d0d3423c0a70 (patch) | |
tree | dfcda5da356b660fadb8b133772c926c08908cbb /tests/test.h | |
parent | 7774ae2f8c2dca9ab2d93082856f031e78a1b5f0 (diff) | |
download | conts-b0d619e2c9595f4ec05463e87be9d0d3423c0a70.tar.gz conts-b0d619e2c9595f4ec05463e87be9d0d3423c0a70.zip |
use covsrv for coverage testing
Diffstat (limited to 'tests/test.h')
-rw-r--r-- | tests/test.h | 12 |
1 files changed, 12 insertions, 0 deletions
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 <covsrv/covsrv.h> + +#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 */ |