From 90b2e9507e9d720452792b863b422221fe96d948 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Thu, 29 Jan 2015 22:52:29 +0100 Subject: Unified signature of resolve functions, passing the "owner" to the callback functions in ParserScope::resolve --- test/core/model/DomainTest.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'test/core/model/DomainTest.cpp') diff --git a/test/core/model/DomainTest.cpp b/test/core/model/DomainTest.cpp index 8bf1a47..767ac0c 100644 --- a/test/core/model/DomainTest.cpp +++ b/test/core/model/DomainTest.cpp @@ -50,41 +50,41 @@ TEST(Domain, testDomainResolving) std::vector res; // There is one domain called "book" - res = domain->resolve("book", typeOf()); + res = domain->resolve(RttiTypes::Domain, "book"); ASSERT_EQ(1U, res.size()); - assert_path(res[0], typeOf(), {"book"}); + assert_path(res[0], RttiTypes::Domain, {"book"}); // There is one domain called "book" - res = domain->resolve("book", typeOf()); + res = domain->resolve(RttiTypes::StructuredClass, "book"); ASSERT_EQ(1U, res.size()); - assert_path(res[0], typeOf(), {"book", "book"}); + assert_path(res[0], RttiTypes::StructuredClass, {"book", "book"}); // If we explicitly ask for the "book, book" path, then only the // StructuredClass should be returned. - res = domain->resolve(std::vector{"book", "book"}, - typeOf()); + res = domain->resolve(RttiTypes::Domain, + std::vector{"book", "book"}); ASSERT_EQ(0U, res.size()); - res = domain->resolve(std::vector{"book", "book"}, - typeOf()); + res = domain->resolve(RttiTypes::StructuredClass, + std::vector{"book", "book"}); ASSERT_EQ(1U, res.size()); // If we ask for "section" the result should be unique as well. - res = domain->resolve("section", typeOf()); + res = domain->resolve(RttiTypes::StructuredClass, "section"); ASSERT_EQ(1U, res.size()); - assert_path(res[0], typeOf(), {"book", "section"}); + assert_path(res[0], RttiTypes::StructuredClass, {"book", "section"}); // If we ask for "paragraph" it is referenced two times in the Domain graph, // but should be returned only once. - res = domain->resolve("paragraph", typeOf()); + res = domain->resolve(RttiTypes::StructuredClass, "paragraph"); ASSERT_EQ(1U, res.size()); - assert_path(res[0], typeOf(), {"book", "paragraph"}); + assert_path(res[0], RttiTypes::StructuredClass, {"book", "paragraph"}); } Rooted getClass(const std::string name, Handle dom) { std::vector res = - dom->resolve(name, RttiTypes::StructuredClass); + dom->resolve(RttiTypes::StructuredClass, name); return res[0].node.cast(); } -- cgit v1.2.3