From d99095f4a181357bf0c6d10846351eb0b58b1ccf Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Thu, 6 Mar 2014 00:11:17 +0000 Subject: started to implement rudimentary XML reader (implemented expectOneOf function), changed some conventions in the used files (namespaces, include guards), moved anchor class from domain to document package, removed everything that does not work now from the CMakeLists.txt git-svn-id: file:///var/local/svn/basicwriter@24 daaaf23c-2e50-4459-9457-1e69db5a47bf --- test/model/GraphNode.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'test/model/GraphNode.cpp') diff --git a/test/model/GraphNode.cpp b/test/model/GraphNode.cpp index a5596f5..7f6f2f9 100644 --- a/test/model/GraphNode.cpp +++ b/test/model/GraphNode.cpp @@ -21,14 +21,31 @@ #include namespace ousia { +namespace model { + +// Make the protected constructor of GraphNode available +class TestGraphNode : public GraphNode { + +public: + TestGraphNode(GraphNodeType type, std::shared_ptr parent, + const std::string &name) : + GraphNode(type, parent, name) + { + // Do nothing here + } + +}; TEST(GraphNodeTest, FullyQuallifiedNameTest) { - std::shared_ptr nd1{new GraphNode("node1")}; - std::shared_ptr nd2{new GraphNode("node2", nd1)}; + std::shared_ptr nd1{new TestGraphNode( + GraphNodeType::None, nullptr, "node1")}; + std::shared_ptr nd2{new TestGraphNode( + GraphNodeType::None, nd1, "node2")}; ASSERT_STREQ("node1.node2", nd2->getFullyQualifiedName().c_str()); } } +} -- cgit v1.2.3