summaryrefslogtreecommitdiffstats
path: root/test/patree_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/patree_test.c')
-rw-r--r--test/patree_test.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/patree_test.c b/test/patree_test.c
index 6d30509..c28ec40 100644
--- a/test/patree_test.c
+++ b/test/patree_test.c
@@ -63,17 +63,19 @@ main(int argc, char** argv)
// Insert each string
for (size_t i = 0; i < n_strings; ++i) {
- ZixStatus st = zix_patree_insert(patree, strings[i]);
+ ZixStatus st = zix_patree_insert(patree, strings[i], strlen(strings[i]));
if (st) {
return test_fail("Failed to insert `%s'\n", strings[i]);
}
}
- //zix_patree_print_dot(patree, stdout);
+ FILE* dot_file = fopen("patree.dot", "w");
+ zix_patree_print_dot(patree, dot_file);
+ fclose(dot_file);
// Attempt to insert each string again
for (size_t i = 0; i < n_strings; ++i) {
- ZixStatus st = zix_patree_insert(patree, strings[i]);
+ ZixStatus st = zix_patree_insert(patree, strings[i], strlen(strings[i]));
if (st != ZIX_STATUS_EXISTS) {
return test_fail("Double inserted `%s'\n", strings[i]);
}