summaryrefslogtreecommitdiffstats
path: root/src/sord_test.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-03-03 21:42:30 +0000
committerDavid Robillard <d@drobilla.net>2012-03-03 21:42:30 +0000
commit8be9efb931773da4afc90ddaa1776387a9cea630 (patch)
tree9f56e22aa5de381dea400d24ee0848dd4e801b25 /src/sord_test.c
parent3d1d265a9e32c96cf2a959de6a569afd8b79ec81 (diff)
downloadsord-8be9efb931773da4afc90ddaa1776387a9cea630.tar.gz
sord-8be9efb931773da4afc90ddaa1776387a9cea630.tar.bz2
sord-8be9efb931773da4afc90ddaa1776387a9cea630.zip
Add sord_iter_get_node().
git-svn-id: http://svn.drobilla.net/sord/trunk@201 3d64ff67-21c5-427c-a301-fe4f08042e5a
Diffstat (limited to 'src/sord_test.c')
-rw-r--r--src/sord_test.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/sord_test.c b/src/sord_test.c
index 279c147..15d4ad6 100644
--- a/src/sord_test.c
+++ b/src/sord_test.c
@@ -25,7 +25,6 @@ static const int DIGITS = 3;
static const int MAX_NUM = 999;
static const int n_objects_per = 2;
-
typedef struct {
SordQuad query;
int expected_num_results;
@@ -299,9 +298,12 @@ test_read(SordWorld* world, SordModel* sord, SordNode* g,
if (id[0] == last_subject)
continue;
- SordQuad subpat = { id[0], 0, 0 };
- SordIter* subiter = sord_find(sord, subpat);
- int num_sub_results = 0;
+ SordQuad subpat = { id[0], 0, 0 };
+ SordIter* subiter = sord_find(sord, subpat);
+ int num_sub_results = 0;
+ if (sord_iter_get_node(subiter, SORD_SUBJECT) != id[0]) {
+ return test_fail("Fail: Incorrect initial submatch\n");
+ }
for (; !sord_iter_end(subiter); sord_iter_next(subiter)) {
SordQuad subid;
sord_iter_get(subiter, subid);