From ae7d4f67ba782f7f53deaf0596a2b52155617a6b Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Wed, 2 Jun 2021 00:37:20 +0200 Subject: add dns tests --- tests/main.c | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) (limited to 'tests/main.c') diff --git a/tests/main.c b/tests/main.c index 65d527f..4b1cfd2 100644 --- a/tests/main.c +++ b/tests/main.c @@ -1,33 +1,28 @@ -#include - -START_TEST (test_example) { - ck_abort(); -} END_TEST - -Suite* tests(void) { - Suite *s; - TCase *tc_core; - - s = suite_create("DNS Tests"); - - tc_core = tcase_create("Core"); +/* + * tests/main.c + * (c) 2021 Jonas Gunz + * License: MIT + */ - tcase_add_test(tc_core, test_example); - suite_add_tcase(s, tc_core); +#include - return s; -} +#include "tests.h" int main() { Suite *s; SRunner *sr; + int failed; - s = tests(); - sr = srunner_create(s); + s = suite_create("All Tests"); + suite_add_tcase(s, test_dns()); + + sr = srunner_create(s); srunner_run_all(sr,CK_NORMAL); + failed = srunner_ntests_failed(sr); + srunner_free(sr); - return srunner_ntests_failed(sr); + return failed; } -- cgit v1.2.3