aboutsummaryrefslogtreecommitdiff
path: root/tests/main.c
blob: f1a9f7d9a4a1586563e9d6472bf62c287625f307 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
 * tests/main.c
 * (c) 2021 Jonas Gunz <himself@jonasgunz.de>
 * License: MIT
 */

/* https://libcheck.github.io/check/doc/doxygen/html/check_8h.html */

#include <check.h>

#include "tests.h"

int main() {
	Suite *s;
	SRunner *sr;
	int failed;

	s = suite_create("All Tests");

	suite_add_tcase(s, test_dns());
	suite_add_tcase(s, test_tree());
	suite_add_tcase(s, test_zonefile());
	suite_add_tcase(s, test_record());

	sr = srunner_create(s);
	srunner_run_all(sr,CK_VERBOSE);

	failed = srunner_ntests_failed(sr);

	srunner_free(sr);

	return failed;
}