summaryrefslogtreecommitdiff
path: root/tests/test_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_lib.c')
-rw-r--r--tests/test_lib.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/test_lib.c b/tests/test_lib.c
new file mode 100644
index 0000000..92eb058
--- /dev/null
+++ b/tests/test_lib.c
@@ -0,0 +1,28 @@
+#include <CUnit/CUnit.h>
+#include <CUnit/Basic.h>
+#include "kitchensink/kitchensink.h"
+
+void source_test_suite(CU_pSuite suite);
+
+int main(int argc, char **argv) {
+ CU_pSuite suite = NULL;
+
+ Kit_Init(KIT_INIT_NETWORK|KIT_INIT_FORMATS);
+
+ if(CU_initialize_registry() != CUE_SUCCESS) {
+ return CU_get_error();
+ }
+
+ suite = CU_add_suite("Source functions", NULL, NULL);
+ if(suite == NULL) goto end;
+ source_test_suite(suite);
+
+ // Run tests
+ CU_basic_set_mode(CU_BRM_VERBOSE);
+ CU_basic_run_tests();
+
+end:
+ CU_cleanup_registry();
+ Kit_Quit();
+ return CU_get_error();
+}