diff options
Diffstat (limited to 'src/tests/common.h')
-rw-r--r-- | src/tests/common.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/tests/common.h b/src/tests/common.h new file mode 100644 index 00000000..0e954d7d --- /dev/null +++ b/src/tests/common.h @@ -0,0 +1,21 @@ +#ifndef __TESTS_COMMON_H__ +#define __TESTS_COMMON_H__ + +#include <talloc.h> + +extern TALLOC_CTX *global_talloc_context; + +#define check_leaks(ctx, bytes) _check_leaks((ctx), (bytes), __location__) +void _check_leaks(TALLOC_CTX *ctx, + size_t bytes, + const char *location); + +void check_leaks_push(TALLOC_CTX *ctx); + +#define check_leaks_pop(ctx) _check_leaks_pop((ctx), __location__) +void _check_leaks_pop(TALLOC_CTX *ctx, const char *location); + +void leak_check_setup(void); +void leak_check_teardown(void); + +#endif /* !__TESTS_COMMON_H__ */ |