summaryrefslogtreecommitdiffstats
path: root/src/sord_test.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-01-16 22:23:42 +0000
committerDavid Robillard <d@drobilla.net>2012-01-16 22:23:42 +0000
commitbcdb9db57e8f68ba90077a77a4152b72ca6da7ac (patch)
tree72e39dbd9f503827bbb74d311c22456eef918736 /src/sord_test.c
parentec82c58f79e7555b4dfe9b832099aa8ee240b8ec (diff)
downloadsord-bcdb9db57e8f68ba90077a77a4152b72ca6da7ac.tar.gz
sord-bcdb9db57e8f68ba90077a77a4152b72ca6da7ac.tar.bz2
sord-bcdb9db57e8f68ba90077a77a4152b72ca6da7ac.zip
Support compilation as C++ under MSVC++.
git-svn-id: http://svn.drobilla.net/sord/trunk@194 3d64ff67-21c5-427c-a301-fe4f08042e5a
Diffstat (limited to 'src/sord_test.c')
-rw-r--r--src/sord_test.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/sord_test.c b/src/sord_test.c
index 93fa735..fa2e9ff 100644
--- a/src/sord_test.c
+++ b/src/sord_test.c
@@ -23,6 +23,8 @@
static const int DIGITS = 3;
static const int MAX_NUM = 999;
+static const int n_objects_per = 2;
+
typedef struct {
SordQuad query;
@@ -58,7 +60,6 @@ int
generate(SordWorld* world,
SordModel* sord,
size_t n_quads,
- size_t n_objects_per,
SordNode* graph)
{
fprintf(stderr, "Generating %zu (S P *) quads with %zu objects each\n",
@@ -177,7 +178,7 @@ generate(SordWorld* world,
int
test_read(SordWorld* world, SordModel* sord, SordNode* g,
- const size_t n_quads, const int n_objects_per)
+ const size_t n_quads)
{
int ret = EXIT_SUCCESS;
@@ -330,8 +331,7 @@ test_read(SordWorld* world, SordModel* sord, SordNode* g,
int
main(int argc, char** argv)
{
- static const size_t n_quads = 300;
- static const int n_objects_per = 2;
+ static const size_t n_quads = 300;
sord_free(NULL); // Shouldn't crash
@@ -339,9 +339,9 @@ main(int argc, char** argv)
// Create with minimal indexing
SordModel* sord = sord_new(world, SORD_SPO, false);
- generate(world, sord, n_quads, n_objects_per, NULL);
+ generate(world, sord, n_quads, NULL);
- if (test_read(world, sord, NULL, n_quads, n_objects_per)) {
+ if (test_read(world, sord, NULL, n_quads)) {
sord_free(sord);
sord_world_free(world);
return EXIT_FAILURE;
@@ -454,8 +454,8 @@ main(int argc, char** argv)
for (int i = 0; i < 6; ++i) {
sord = sord_new(world, (1 << i), false);
printf("Testing Index `%s'\n", index_names[i]);
- generate(world, sord, n_quads, n_objects_per, 0);
- if (test_read(world, sord, 0, n_quads, n_objects_per))
+ generate(world, sord, n_quads, 0);
+ if (test_read(world, sord, 0, n_quads))
goto fail;
sord_free(sord);
}
@@ -468,8 +468,8 @@ main(int argc, char** argv)
sord = sord_new(world, (1 << i), true);
printf("Testing Index `%s'\n", graph_index_names[i]);
SordNode* graph = uri(world, 42);
- generate(world, sord, n_quads, n_objects_per, graph);
- if (test_read(world, sord, graph, n_quads, n_objects_per))
+ generate(world, sord, n_quads, graph);
+ if (test_read(world, sord, graph, n_quads))
goto fail;
sord_free(sord);
}