diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2013-04-01 13:22:49 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-04-17 11:43:22 +0200 |
commit | 4139a7a731f2831963a42b26aac111422be28792 (patch) | |
tree | c69d00109216ecaae36d54f3877946d89e16de17 /src/tests/refcount-tests.c | |
parent | 714ba5f50551a42df324714358dc379b351d4a53 (diff) | |
download | sssd-4139a7a731f2831963a42b26aac111422be28792.tar.gz sssd-4139a7a731f2831963a42b26aac111422be28792.tar.xz sssd-4139a7a731f2831963a42b26aac111422be28792.zip |
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
Diffstat (limited to 'src/tests/refcount-tests.c')
-rw-r--r-- | src/tests/refcount-tests.c | 8 |
1 files changed, 4 insertions, 4 deletions
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 <tevent.h> #include <popt.h> -#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); |