summaryrefslogtreecommitdiffstats
path: root/src/tests/crypto-tests.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2013-04-01 13:22:49 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-04-17 11:43:22 +0200
commit4139a7a731f2831963a42b26aac111422be28792 (patch)
treec69d00109216ecaae36d54f3877946d89e16de17 /src/tests/crypto-tests.c
parent714ba5f50551a42df324714358dc379b351d4a53 (diff)
downloadsssd-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/crypto-tests.c')
-rw-r--r--src/tests/crypto-tests.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tests/crypto-tests.c b/src/tests/crypto-tests.c
index 8932d8f56..87184594e 100644
--- a/src/tests/crypto-tests.c
+++ b/src/tests/crypto-tests.c
@@ -26,7 +26,7 @@
#include <check.h>
#include "util/util.h"
-#include "tests/common.h"
+#include "tests/common_check.h"
/* interfaces under test */
#include "util/crypto/sss_crypto.h"
@@ -68,7 +68,7 @@ START_TEST(test_encrypt_decrypt)
test_ctx = talloc_new(NULL);
fail_if(test_ctx == NULL);
- check_leaks_push(test_ctx);
+ ck_leaks_push(test_ctx);
for (i=0; password[i]; i++) {
ret = sss_password_encrypt(test_ctx, password[i], strlen(password[i])+1,
@@ -84,7 +84,7 @@ START_TEST(test_encrypt_decrypt)
talloc_free(ctpwd);
}
- check_leaks_pop(test_ctx);
+ ck_leaks_pop(test_ctx);
talloc_free(test_ctx);
}
END_TEST
@@ -163,7 +163,7 @@ Suite *crypto_suite(void)
Suite *s = suite_create("sss_crypto");
TCase *tc = tcase_create("sss crypto tests");
- tcase_add_checked_fixture(tc, leak_check_setup, leak_check_teardown);
+ tcase_add_checked_fixture(tc, ck_leak_check_setup, ck_leak_check_teardown);
/* Do some testing */
#ifdef HAVE_NSS
tcase_add_test(tc, test_nss_init);