summaryrefslogtreecommitdiff
path: root/src/tests/tests_main.c
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2021-07-02 22:02:06 -0500
committersanine-a <sanine.not@pm.me>2021-07-02 22:02:06 -0500
commit6416977ea7e2159a67fd6a9877c5e01abe2f8269 (patch)
tree84941ea147ade3eb3545048d6b7cf68b5ee29e0d /src/tests/tests_main.c
parent8c66847bfc4a6af1ca86e916b678a6b8ce58be2f (diff)
begin refactor of tests into individual source files
Diffstat (limited to 'src/tests/tests_main.c')
-rw-r--r--src/tests/tests_main.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/tests/tests_main.c b/src/tests/tests_main.c
new file mode 100644
index 0000000..06c6940
--- /dev/null
+++ b/src/tests/tests_main.c
@@ -0,0 +1,28 @@
+#include "hs_tests.h"
+
+/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ *
+ * RUN TESTS
+ *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ */
+
+int tests_run = 0;
+int tests_failed = 0;
+
+int main()
+{
+ printf("================ start tests ================\n\n");
+
+ hs_type_to_string_tests();
+ hs_parse_args_tests();
+ hs_parse_overloaded_tests();
+
+ hs_pushstring_tests();
+
+ printf("\n=============== tests finished ===============\n\n");
+
+ const char *color = tests_failed == 0 ? GREEN : RED;
+ printf("%sran %d tests, %d failed\n" RESET, color, tests_run, tests_failed);
+ return tests_failed;
+}