test: made tests run again.

* added call to SqliteStorage::init() in storage tests.
* made Storage::getIdForNodeWithNameHierarchy(...) return the correct node id again.
This commit is contained in:
malte_langkabel
2016-01-14 13:28:49 +01:00
parent c9e499c86c
commit 5a39cab495
4 changed files with 10 additions and 12 deletions
+4
View File
@@ -14,6 +14,7 @@ public:
int nodeCount = -1;
{
SqliteStorage storage(databasePath);
storage.init();
storage.beginTransaction();
storage.addNode(0, "a", false);
storage.commitTransaction();
@@ -30,6 +31,7 @@ public:
int nodeCount = -1;
{
SqliteStorage storage(databasePath);
storage.init();
storage.beginTransaction();
int nodeId = storage.addNode(0, "a", false);
storage.removeElement(nodeId);
@@ -47,6 +49,7 @@ public:
int edgeCount = -1;
{
SqliteStorage storage(databasePath);
storage.init();
storage.beginTransaction();
int sourceNodeId = storage.addNode(0, "a", false);
int targetNodeId = storage.addNode(0, "b", false);
@@ -65,6 +68,7 @@ public:
int edgeCount = -1;
{
SqliteStorage storage(databasePath);
storage.init();
storage.beginTransaction();
int sourceNodeId = storage.addNode(0, "a", false);
int targetNodeId = storage.addNode(0, "b", false);
+2 -2
View File
@@ -651,12 +651,12 @@ private:
}
};
ParseLocation validLocation(Id locationId = 0) const // id is not used as id ..... who programs this? ebsi? :P
ParseLocation validLocation(Id locationId = 0) const
{
return ParseLocation(m_filePath, 1, locationId, 1, locationId);
}
bool isValidLocation(TokenLocation* location, Id locationId) const // remove this one
bool isValidLocation(TokenLocation* location, Id locationId) const
{
return
location->getFilePath() == m_filePath &&