diff options
author | David Robillard <d@drobilla.net> | 2011-02-04 20:16:47 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-02-04 20:16:47 +0000 |
commit | 3e1a25af1cc2aab02b6d1a3e982d04e7e995e189 (patch) | |
tree | 3726cc754ad92634e658208afb61d5032604f683 /src/sord_test.c | |
parent | 7528971844b737988af552fa62bbe42b354e2407 (diff) | |
download | sord-3e1a25af1cc2aab02b6d1a3e982d04e7e995e189.tar.gz sord-3e1a25af1cc2aab02b6d1a3e982d04e7e995e189.tar.bz2 sord-3e1a25af1cc2aab02b6d1a3e982d04e7e995e189.zip |
Remove sord_set_option and sord_open, just pass options to sord_new instead.
git-svn-id: http://svn.drobilla.net/sord/trunk@22 3d64ff67-21c5-427c-a301-fe4f08042e5a
Diffstat (limited to 'src/sord_test.c')
-rw-r--r-- | src/sord_test.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/sord_test.c b/src/sord_test.c index 82e7612..af2da40 100644 --- a/src/sord_test.c +++ b/src/sord_test.c @@ -267,10 +267,8 @@ main(int argc, char** argv) sord_free(NULL); // Shouldn't crash - // Create with default options - Sord sord = sord_new(); - sord_set_option(sord, "http://unknown", "something", SORD_LITERAL, NULL, NULL); - sord_open(sord); + // Create with minimal indexing + Sord sord = sord_new(SORD_SPO, false); generate(sord, n_quads, n_objects_per); if (test_read(sord, n_quads, n_objects_per)) { @@ -314,28 +312,20 @@ main(int argc, char** argv) sord_free(sord); - // Test each pattern type with each index static const char* const index_names[6] = { "spo", "sop", "ops", "osp", "pso", "pos" }; - char* option = strdup("http://drobilla.net/ns/sord#index-xxx"); - const size_t option_len = strlen(option); for (int i = 0; i < 6; ++i) { - strncpy(option + option_len - 3, index_names[i], 3); - sord = sord_new(); - sord_set_option(sord, option, "true", SORD_LITERAL, NULL, NULL); + sord = sord_new((1 << i), false); printf("Testing Index `%s'\n", index_names[i]); - sord_open(sord); generate(sord, n_quads, n_objects_per); if (test_read(sord, n_quads, n_objects_per)) goto fail; sord_free(sord); } - free(option); - sord = sord_new(); - sord_open(sord); + sord = sord_new(SORD_SPO, false); if (test_write(sord, n_quads, n_objects_per)) goto fail; |