diff options
Diffstat (limited to 'libtest/libtest_stop_tracking.c')
| -rw-r--r-- | libtest/libtest_stop_tracking.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/libtest/libtest_stop_tracking.c b/libtest/libtest_stop_tracking.c new file mode 100644 index 0000000..29bb2aa --- /dev/null +++ b/libtest/libtest_stop_tracking.c @@ -0,0 +1,34 @@ +/* See LICENSE file for copyright and license details. */ +#include "common.h" +#ifndef TEST + + +void +libtest_stop_tracking(void) +{ + libtest_malloc_accept_leakage = 1; +} + + +#else + + +int +main(void) +{ + SET_UP_ALARM(); + + EXPECT(libtest_malloc_accept_leakage == 1); + + libtest_malloc_accept_leakage = 0; + + EXPECT(libtest_malloc_accept_leakage == 0); + + libtest_stop_tracking(); + EXPECT(libtest_malloc_accept_leakage == 1); + + return 0; +} + + +#endif |
