diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2021-06-02 00:37:20 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2021-06-02 00:37:20 +0200 |
commit | ae7d4f67ba782f7f53deaf0596a2b52155617a6b (patch) | |
tree | 4b9fb0a726d9a193e3a61db6e13a67676267394c /tests/main.c | |
parent | 1418d5cc62f2f888aed5c033fa3fd9f50eb67235 (diff) | |
download | dns-ae7d4f67ba782f7f53deaf0596a2b52155617a6b.tar.gz |
add dns tests
Diffstat (limited to 'tests/main.c')
-rw-r--r-- | tests/main.c | 35 |
1 files changed, 15 insertions, 20 deletions
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 <check.h> - -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 <himself@jonasgunz.de> + * License: MIT + */ - tcase_add_test(tc_core, test_example); - suite_add_tcase(s, tc_core); +#include <check.h> - 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; } |