diff options
author | David Robillard <d@drobilla.net> | 2014-10-01 15:50:28 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-10-01 15:50:28 +0000 |
commit | b10ae60816015d85ed9aa27fdb98d1b0f6bfdf64 (patch) | |
tree | 5e2307f443633b9c4bbf8bc96cfeaff5ff2337f8 /test/patree_test.c | |
parent | dee23c2058fd33e14610ceda277c11e4d8ce768b (diff) | |
download | zix-b10ae60816015d85ed9aa27fdb98d1b0f6bfdf64.tar.gz zix-b10ae60816015d85ed9aa27fdb98d1b0f6bfdf64.tar.bz2 zix-b10ae60816015d85ed9aa27fdb98d1b0f6bfdf64.zip |
Improve ZixPatree with more compact index.
git-svn-id: http://svn.drobilla.net/zix/trunk@95 df6676b4-ccc9-40e5-b5d6-7c4628a128e3
Diffstat (limited to 'test/patree_test.c')
-rw-r--r-- | test/patree_test.c | 8 |
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]); } |