|
@@ -252,29 +252,27 @@ _graph_txn (LSUP_StoreType type)
|
|
LSUP_Triple *trp = create_triples();
|
|
LSUP_Triple *trp = create_triples();
|
|
|
|
|
|
LSUP_Graph *gr;
|
|
LSUP_Graph *gr;
|
|
- LSUP_Store *store;
|
|
|
|
- if (type == LSUP_STORE_HTABLE) {
|
|
|
|
- gr = LSUP_graph_new (NULL, NULL, NULL);
|
|
|
|
- } else {
|
|
|
|
- store = LSUP_store_new (type, NULL, 0);
|
|
|
|
- gr = LSUP_graph_new (store, NULL, NULL);
|
|
|
|
- }
|
|
|
|
|
|
+ LSUP_Store *store =
|
|
|
|
+ type == LSUP_STORE_HTABLE ? NULL
|
|
|
|
+ : LSUP_store_new (type, NULL, 0);
|
|
|
|
+
|
|
|
|
+ gr = LSUP_graph_new (store, NULL, NULL);
|
|
|
|
|
|
void *txn;
|
|
void *txn;
|
|
size_t ct;
|
|
size_t ct;
|
|
|
|
|
|
- EXPECT_PASS (LSUP_graph_begin (gr, 0, &txn));
|
|
|
|
|
|
+ EXPECT_PASS (LSUP_store_begin (store, 0, &txn));
|
|
EXPECT_PASS (LSUP_graph_add_txn (txn, gr, trp, &ct));
|
|
EXPECT_PASS (LSUP_graph_add_txn (txn, gr, trp, &ct));
|
|
- LSUP_graph_abort (gr, txn);
|
|
|
|
|
|
+ LSUP_store_abort (store, txn);
|
|
|
|
|
|
// NOTE that ct reports the count before the txn was aborted. This is
|
|
// NOTE that ct reports the count before the txn was aborted. This is
|
|
// intentional.
|
|
// intentional.
|
|
EXPECT_INT_EQ (ct, 8);
|
|
EXPECT_INT_EQ (ct, 8);
|
|
EXPECT_INT_EQ (LSUP_graph_size (gr), 0);
|
|
EXPECT_INT_EQ (LSUP_graph_size (gr), 0);
|
|
|
|
|
|
- EXPECT_PASS (LSUP_graph_begin (gr, 0, &txn));
|
|
|
|
|
|
+ EXPECT_PASS (LSUP_store_begin (store, 0, &txn));
|
|
EXPECT_PASS (LSUP_graph_add_txn (txn, gr, trp, &ct));
|
|
EXPECT_PASS (LSUP_graph_add_txn (txn, gr, trp, &ct));
|
|
- LSUP_graph_commit (gr, txn);
|
|
|
|
|
|
+ LSUP_store_commit (store, txn);
|
|
|
|
|
|
EXPECT_INT_EQ (ct, 8);
|
|
EXPECT_INT_EQ (ct, 8);
|
|
EXPECT_INT_EQ (LSUP_graph_size (gr), 8);
|
|
EXPECT_INT_EQ (LSUP_graph_size (gr), 8);
|