From 7daed2f8431e89e2bd041a54bc1bef8c45329092 Mon Sep 17 00:00:00 2001 From: Benjamin Paassen Date: Wed, 11 Feb 2015 17:55:04 +0100 Subject: improved pathto --- test/core/model/DomainTest.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'test/core/model/DomainTest.cpp') diff --git a/test/core/model/DomainTest.cpp b/test/core/model/DomainTest.cpp index 79b62f0..2e20c3b 100644 --- a/test/core/model/DomainTest.cpp +++ b/test/core/model/DomainTest.cpp @@ -101,7 +101,7 @@ TEST(Descriptor, pathTo) Rooted book = getClass("book", domain); Rooted section = getClass("section", domain); // get the path in between. - std::vector> path = book->pathTo(section); + NodeVector path = book->pathTo(section); ASSERT_EQ(1U, path.size()); ASSERT_TRUE(path[0]->isa(&RttiTypes::FieldDescriptor)); @@ -202,18 +202,19 @@ TEST(Descriptor, pathToAdvanced) E_field->addChild(target); ASSERT_TRUE(domain->validate(logger)); + #ifdef MANAGER_GRAPHVIZ_EXPORT // dump the manager state mgr.exportGraphviz("nastyDomain.dot"); #endif // and now we should be able to find the shortest path as suggested - std::vector> path = start->pathTo(target); + NodeVector path = start->pathTo(target); ASSERT_EQ(3U, path.size()); ASSERT_TRUE(path[0]->isa(&RttiTypes::FieldDescriptor)); ASSERT_EQ("second", path[0]->getName()); ASSERT_TRUE(path[1]->isa(&RttiTypes::StructuredClass)); - ASSERT_EQ("B", path[1]->getName()); + ASSERT_EQ("C", path[1]->getName()); ASSERT_TRUE(path[2]->isa(&RttiTypes::FieldDescriptor)); ASSERT_EQ("", path[2]->getName()); } -- cgit v1.2.3