• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * tests/check-all.c		overall unit test program
3  *
4  *	This library is free software; you can redistribute it and/or
5  *	modify it under the terms of the GNU Lesser General Public
6  *	License as published by the Free Software Foundation version 2.1
7  *	of the License.
8  *
9  * Copyright (c) 2013 Thomas Graf <tgraf@suug.ch>
10  */
11 
12 #include <check.h>
13 
14 extern Suite *make_nl_addr_suite(void);
15 extern Suite *make_nl_attr_suite(void);
16 
main_suite(void)17 static Suite *main_suite(void)
18 {
19 	Suite *suite = suite_create("main");
20 
21 	return suite;
22 }
23 
main(int argc,char * argv[])24 int main(int argc, char *argv[])
25 {
26 	SRunner *runner;
27 	int nfailed;
28 
29 	runner = srunner_create(main_suite());
30 
31 	/* Add testsuites below */
32 
33 	srunner_add_suite(runner, make_nl_addr_suite());
34 	srunner_add_suite(runner, make_nl_attr_suite());
35 
36 	/* Do not add testsuites below this line */
37 
38 	srunner_run_all(runner, CK_ENV);
39 
40 	nfailed = srunner_ntests_failed(runner);
41 	srunner_free(runner);
42 
43 	return nfailed != 0;
44 }
45