|
@@ -180,6 +180,26 @@ _graph_remove (LSUP_store_type type)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+static int
|
|
|
|
+test_environment()
|
|
|
|
+{
|
|
|
|
+ // The env should already be initialized and re-initializing it is idempotent.
|
|
|
|
+ ASSERT (LSUP_init() > 0, "Environment not initialized!");
|
|
|
|
+ EXPECT_INT_EQ (LSUP_env_is_init, true);
|
|
|
|
+
|
|
|
|
+ // Tearing down is idempotent too.
|
|
|
|
+ LSUP_done();
|
|
|
|
+ EXPECT_INT_EQ (LSUP_env_is_init, false);
|
|
|
|
+ LSUP_done();
|
|
|
|
+ EXPECT_INT_EQ (LSUP_env_is_init, false);
|
|
|
|
+
|
|
|
|
+ ASSERT (LSUP_init() > 0, "Environment not initialized!");
|
|
|
|
+ EXPECT_INT_EQ (LSUP_env_is_init, true);
|
|
|
|
+ ASSERT (LSUP_init() > 0, "Environment not initialized!");
|
|
|
|
+ EXPECT_INT_EQ (LSUP_env_is_init, true);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
static int test_graph_new() {
|
|
static int test_graph_new() {
|
|
if (_graph_new (LSUP_STORE_MEM) != 0) return -1;
|
|
if (_graph_new (LSUP_STORE_MEM) != 0) return -1;
|
|
if (_graph_new (LSUP_STORE_MDB_TMP) != 0) return -1;
|
|
if (_graph_new (LSUP_STORE_MDB_TMP) != 0) return -1;
|