Browse Source

Revert change that threw off counter.

Stefano Cossu 3 years ago
parent
commit
e652b6ddf6
1 changed files with 5 additions and 5 deletions
  1. 5 5
      test/test_store_mdb.c

+ 5 - 5
test/test_store_mdb.c

@@ -10,7 +10,7 @@ static char *path = "/tmp/testdb";
  */
 static int test_triple_store()
 {
-    EXPECT_PASS (LSUP_mdbstore_setup (&path, true));
+    EXPECT_PASS (LSUP_mdbstore_setup (path, true));
 
     LSUP_MDBStore *store = LSUP_mdbstore_new (path, NULL); // triple store.
     ASSERT (store != NULL, "Error initializing store!");
@@ -103,7 +103,7 @@ static int test_triple_store()
  */
 static int test_quad_store()
 {
-    EXPECT_PASS (LSUP_mdbstore_setup (&path, true));
+    EXPECT_PASS (LSUP_mdbstore_setup (path, true));
 
     LSUP_Term *ctx1 = LSUP_uri_new ("urn:c:1");
     LSUP_Buffer *sc1 = LSUP_buffer_new_from_term (ctx1);
@@ -127,18 +127,18 @@ static int test_quad_store()
     LSUP_Term *ctx2 = LSUP_uri_new ("urn:c:2");
     LSUP_Buffer *sc2 = LSUP_buffer_new_from_term (ctx2);
 
-    // Only triples 4÷9 in default context.
+    // Only triples 4÷9 in context 2 (effectively 4 non-duplicates).
     EXPECT_PASS (LSUP_mdbstore_add (store, sc2, ser_trp + 4, 6, &ct));
     EXPECT_INT_EQ (ct, 4);
 
     // 6 triples in ctx1 + 6 in ctx2 - 2 duplicates
     EXPECT_INT_EQ (LSUP_mdbstore_size (store), 10);
 
-    // Test lookups.
-    // This context is not with any triple.
+    // This context has no triples.
     LSUP_Term *ctx3 = LSUP_uri_new ("urn:c:3");
     LSUP_Buffer *sc3 = LSUP_buffer_new_from_term (ctx3);
 
+    // Test lookups.
     LSUP_SerTriple lut[41] = {
         // Any context
         {NULL, NULL, NULL},                                 // #0