From 4139a7a731f2831963a42b26aac111422be28792 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Mon, 1 Apr 2013 13:22:49 +0200 Subject: Make leak checks usable in tests that do not utilize check * Remove check-specific failure reporting from common_check.c * Check-specific abstraction over memleak checks * Rename common_check.c to leak_check.c --- src/tests/refcount-tests.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/tests/refcount-tests.c') diff --git a/src/tests/refcount-tests.c b/src/tests/refcount-tests.c index d93f1561f..9713d4783 100644 --- a/src/tests/refcount-tests.c +++ b/src/tests/refcount-tests.c @@ -28,7 +28,7 @@ #include #include -#include "tests/common.h" +#include "tests/common_check.h" #include "util/util.h" /* Interface under test */ @@ -146,7 +146,7 @@ START_TEST(test_refcount_swap) tmp_ctx = talloc_new(NULL); - check_leaks_push(tmp_ctx); + ck_leaks_push(tmp_ctx); container1 = talloc(tmp_ctx, struct container); container2 = talloc(tmp_ctx, struct container); @@ -170,7 +170,7 @@ START_TEST(test_refcount_swap) CHECK_FILLER(container2->foo); talloc_free(container2); - check_leaks_pop(tmp_ctx); + ck_leaks_pop(tmp_ctx); talloc_free(tmp_ctx); } END_TEST @@ -182,7 +182,7 @@ Suite *create_suite(void) TCase *tc = tcase_create("REFCOUNT Tests"); /* Do some testing */ - tcase_add_checked_fixture(tc, leak_check_setup, leak_check_teardown); + tcase_add_checked_fixture(tc, ck_leak_check_setup, ck_leak_check_teardown); tcase_add_test(tc, test_refcount_basic); tcase_add_test(tc, test_refcount_swap); -- cgit