diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2014-03-06 00:11:17 +0000 |
---|---|---|
committer | andreas <andreas@daaaf23c-2e50-4459-9457-1e69db5a47bf> | 2014-03-06 00:11:17 +0000 |
commit | d99095f4a181357bf0c6d10846351eb0b58b1ccf (patch) | |
tree | 74daacc842023b14e27aa49403ee8d4aaa8bb172 /test/model/GraphNode.cpp | |
parent | f098dc45183d2b7a99e65b62448f59d12cc3c056 (diff) |
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
Diffstat (limited to 'test/model/GraphNode.cpp')
-rw-r--r-- | test/model/GraphNode.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
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 <model/GraphNode.hpp> namespace ousia { +namespace model { + +// Make the protected constructor of GraphNode available +class TestGraphNode : public GraphNode { + +public: + TestGraphNode(GraphNodeType type, std::shared_ptr<GraphNode> parent, + const std::string &name) : + GraphNode(type, parent, name) + { + // Do nothing here + } + +}; TEST(GraphNodeTest, FullyQuallifiedNameTest) { - std::shared_ptr<GraphNode> nd1{new GraphNode("node1")}; - std::shared_ptr<GraphNode> nd2{new GraphNode("node2", nd1)}; + std::shared_ptr<GraphNode> nd1{new TestGraphNode( + GraphNodeType::None, nullptr, "node1")}; + std::shared_ptr<GraphNode> nd2{new TestGraphNode( + GraphNodeType::None, nd1, "node2")}; ASSERT_STREQ("node1.node2", nd2->getFullyQualifiedName().c_str()); } } +} |