aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornodist <kevin.comas.git@gmail.com>2026-10-07 16:44:38 -0400
committernodist <kevin.comas.git@gmail.com>2026-10-07 16:44:38 -0400
commitcbf7d62712c44d2b3bbb066e6840041b89cfb6d9 (patch)
treeb45f9328250c8f0e1d5037a471f76ee938edbbc7 /test
parent7bd050ccf74222e1b659f2fd6826a86e6afbcc94 (diff)
tree impl
Diffstat (limited to 'test')
-rw-r--r--test/test.c17
-rw-r--r--test/tree.c6
2 files changed, 22 insertions, 1 deletions
diff --git a/test/test.c b/test/test.c
index 6cede92..02a8730 100644
--- a/test/test.c
+++ b/test/test.c
@@ -67,7 +67,22 @@ static int32_t kpl_test_run_all(void) {
int32_t main(int32_t argc, char *argv[]) {
if (argc < 2)
return kpl_test_run_all();
- // TODO run by name
+ kpl_test find = {};
+ for (int32_t arg_index = 1; arg_index < argc; arg_index++) {
+ find.name = argv[arg_index];
+ kpl_test *found = kpl_tree_find(&test_tree, &find);
+ if (!found) {
+ printf(KPL_COLOR2(BOLD, RED) "TEST: " KPL_COLOR(RESET) KPL_COLOR2(BOLD, WHITE) "%s " KPL_COLOR(RESET)
+ KPL_COLOR2(BOLD, RED) "NOT FOUND\n" KPL_COLOR(RESET), find.name);
+ return KPL_EXIT_CODE_ERROR;
+ }
+ kpl_test *duplicates = found->tree_duplicates;
+ while (duplicates) {
+ kpl_test_run_one(duplicates);
+ duplicates = duplicates->tree_duplicates;
+ }
+ kpl_test_run_one(found);
+ }
return kpl_test_report_error();
}
diff --git a/test/tree.c b/test/tree.c
new file mode 100644
index 0000000..caaa23a
--- /dev/null
+++ b/test/tree.c
@@ -0,0 +1,6 @@
+
+#include "kpl_test.h"
+
+KPL_TEST(c_string_trees) {
+ // TODO
+}