aboutsummaryrefslogtreecommitdiffstats
path: root/tests/check.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-06-16 13:48:52 +0200
committerJelmer Vernooij <jelmer@samba.org>2006-06-16 13:48:52 +0200
commitc2fa8279933a103d6576d891e85c1801d90c65ef (patch)
tree6eecae7f4895b54adbaa59d640aa701416c03708 /tests/check.c
parent07e46c92467d0787f1318412186a64cf1c9da562 (diff)
Add unit testing infrastructure.
Diffstat (limited to 'tests/check.c')
-rw-r--r--tests/check.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/check.c b/tests/check.c
new file mode 100644
index 00000000..999da16a
--- /dev/null
+++ b/tests/check.c
@@ -0,0 +1,17 @@
+#include <stdlib.h>
+#include <glib.h>
+#include <gmodule.h>
+#include <check.h>
+
+/* From check_util.c */
+Suite *util_suite(void);
+
+int main (void)
+{
+ int nf;
+ SRunner *sr = srunner_create(util_suite());
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}