|
@@ -63,7 +63,7 @@ static int test_triple_store()
|
|
{ser_trp[4].s, ser_trp[4].p, NULL, NULL},
|
|
{ser_trp[4].s, ser_trp[4].p, NULL, NULL},
|
|
{NULL, ser_trp[7].p, ser_trp[7].o, NULL},
|
|
{NULL, ser_trp[7].p, ser_trp[7].o, NULL},
|
|
{ser_trp[5].s, NULL, ser_trp[5].o, NULL},
|
|
{ser_trp[5].s, NULL, ser_trp[5].o, NULL},
|
|
- {ser_trp[6].s, NULL, ser_trp[5].o, ser_trp[2].s},
|
|
|
|
|
|
+ {ser_trp[5].s, NULL, ser_trp[5].o, ser_trp[2].s},
|
|
|
|
|
|
{ser_trp[4].s, ser_trp[4].p, ser_trp[4].o, NULL},
|
|
{ser_trp[4].s, ser_trp[4].p, ser_trp[4].o, NULL},
|
|
{ser_trp[4].s, ser_trp[4].p, ser_trp[6].o, NULL},
|
|
{ser_trp[4].s, ser_trp[4].p, ser_trp[6].o, NULL},
|
|
@@ -72,7 +72,7 @@ static int test_triple_store()
|
|
size_t results[12] = {
|
|
size_t results[12] = {
|
|
8,
|
|
8,
|
|
5, 1, 1, 0, 1,
|
|
5, 1, 1, 0, 1,
|
|
- 2, 1, 2, 1,
|
|
|
|
|
|
+ 2, 1, 2, 2,
|
|
1, 0,
|
|
1, 0,
|
|
};
|
|
};
|
|
|
|
|
|
@@ -82,10 +82,12 @@ static int test_triple_store()
|
|
|
|
|
|
TRACE("Testing triple lookup #%d.\n", i);
|
|
TRACE("Testing triple lookup #%d.\n", i);
|
|
int rc = LSUP_store_lookup(store, lut[i], &it, &ct);
|
|
int rc = LSUP_store_lookup(store, lut[i], &it, &ct);
|
|
- if (ct > 0) EXPECT_INT_EQ(rc, LSUP_OK);
|
|
|
|
- else if (ct == 0) EXPECT_INT_EQ(rc, LSUP_NORESULT);
|
|
|
|
|
|
+ if (results[i] > 0) EXPECT_INT_EQ(rc, LSUP_OK);
|
|
|
|
+ else EXPECT_INT_EQ(rc, LSUP_NORESULT);
|
|
|
|
|
|
EXPECT_INT_EQ(ct, results[i]);
|
|
EXPECT_INT_EQ(ct, results[i]);
|
|
|
|
+
|
|
|
|
+ LSUP_store_it_free(it);
|
|
}
|
|
}
|
|
|
|
|
|
for (int i = 0; i < NUM_TRP; i++) {
|
|
for (int i = 0; i < NUM_TRP; i++) {
|
|
@@ -269,10 +271,12 @@ static int test_quad_store()
|
|
printf("}\n");
|
|
printf("}\n");
|
|
|
|
|
|
int rc = LSUP_store_lookup(store, lut[i], &it, &ct);
|
|
int rc = LSUP_store_lookup(store, lut[i], &it, &ct);
|
|
- if (ct > 0) EXPECT_INT_EQ(rc, LSUP_OK);
|
|
|
|
- else if (ct == 0) EXPECT_INT_EQ(rc, LSUP_NORESULT);
|
|
|
|
|
|
+ if (results[i] > 0) EXPECT_INT_EQ(rc, LSUP_OK);
|
|
|
|
+ else EXPECT_INT_EQ(rc, LSUP_NORESULT);
|
|
|
|
|
|
EXPECT_INT_EQ(ct, results[i]);
|
|
EXPECT_INT_EQ(ct, results[i]);
|
|
|
|
+
|
|
|
|
+ LSUP_store_it_free(it);
|
|
}
|
|
}
|
|
|
|
|
|
for (int i = 0; i < NUM_TRP; i++) {
|
|
for (int i = 0; i < NUM_TRP; i++) {
|