aboutsummaryrefslogtreecommitdiff
path: root/tests/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/main.c')
-rw-r--r--tests/main.c35
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;
}