aboutsummaryrefslogtreecommitdiffstats
path: root/libtest/libtest_stop_tracking.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libtest/libtest_stop_tracking.c34
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