Commit 8e85e3b7 authored by Adriaan de Groot's avatar Adriaan de Groot 💬
Browse files

Fix rocs1fileformattest: add logging

 - This shows that after loading, the second "default-ish"
   edge type is duplicated, giving four edge types (unidirectional,
   bidirectional, a clone of bidirectional, and "" which was added
   by the test). This was introduced when the second default type
   was added.
parent 55c13cc1
......@@ -76,6 +76,14 @@ void TestRocs1FileFormat::serializeUnserializeTest()
}
}
static void logEdgeTypes(const QList<EdgeTypePtr>& types)
{
qDebug() << "Edge types:";
for (const auto& t : types) {
qDebug() << ".." << t->name() << t->direction();
}
}
void TestRocs1FileFormat::serializeUnserializeTypesTest()
{
GraphDocumentPtr document = GraphDocument::create();
......@@ -83,6 +91,8 @@ void TestRocs1FileFormat::serializeUnserializeTypesTest()
NodeTypePtr nodeType2 = NodeType::create(document);
EdgeTypePtr edgeType2 = EdgeType::create(document);
logEdgeTypes(document->edgeTypes());
// add test data
nodes.insert("a", Node::create(document));
nodes["a"]->setDynamicProperty("label", "first node");
......@@ -102,6 +112,8 @@ void TestRocs1FileFormat::serializeUnserializeTypesTest()
QVERIFY(!format.hasError());
document = format.graphDocument();
logEdgeTypes(document->edgeTypes());
QCOMPARE(document->nodeTypes().count(), 2);
QCOMPARE(document->edgeTypes().count(), 2);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment