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:
@@ -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);
|
||||
|
||||
@@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user