From 3e1a25af1cc2aab02b6d1a3e982d04e7e995e189 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 4 Feb 2011 20:16:47 +0000 Subject: 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 --- src/sord_test.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'src/sord_test.c') 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; -- cgit v1.2.1