Browse Source

Basic mem graph tests.

Stefano Cossu 4 years ago
parent
commit
eb55683edf
2 changed files with 3 additions and 3 deletions
  1. 1 1
      src/graph.c
  2. 2 2
      test/test_graph.c

+ 1 - 1
src/graph.c

@@ -236,7 +236,7 @@ LSUP_graph_size (const Graph *gr)
 {
     TRACE ("Store type: %d\n", gr->store_type);
     if (gr->store_type == LSUP_STORE_MEM)
-        LSUP_htstore_size (gr->ht_store);
+        return LSUP_htstore_size (gr->ht_store);
 
     return LSUP_mdbstore_size (gr->mdb_store);
 }

+ 2 - 2
test/test_graph.c

@@ -2,8 +2,7 @@
 #include "graph.h"
 #include "assets.h"
 
-/* TODO Not yet implemented. */
-static int __attribute__ ((unused))
+static int
 test_graph_mem_new ()
 {
     LSUP_Graph *gr;
@@ -68,6 +67,7 @@ test_graph_mdb_add()
 
 int graph_tests()
 {
+    RUN (test_graph_mem_new);
     RUN (test_graph_mdb_new);
     RUN (test_graph_mdb_add);
     return 0;