summaryrefslogtreecommitdiff
path: root/test/core
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-01-27 16:01:53 +0100
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-01-27 16:01:53 +0100
commiteb6ecdcc85ece4eb84b90f3c9bb920dc1ad2b6d1 (patch)
treecaaaaa969471552a13f5315a3de6e9db15b02a8b /test/core
parent07d326d02415467ba7f5f238a8e72a9e4b7f1549 (diff)
Parsers do no longer return the node they have parsed (as this may be ill-defined -- if a parser only parses a partial document via include, there may be many to no nodes that are returned). Parsers should just use the ParserScope.push funciton. All nodes pushed onto the top-level of the ParserScope are added treated as the nodes the parser has parsed. Adapted all code and all tests accordingly.
Diffstat (limited to 'test/core')
-rw-r--r--test/core/RegistryTest.cpp4
-rw-r--r--test/core/StandaloneEnvironment.hpp2
-rw-r--r--test/core/resource/ResourceRequestTest.cpp8
3 files changed, 7 insertions, 7 deletions
diff --git a/test/core/RegistryTest.cpp b/test/core/RegistryTest.cpp
index 1a23139..4e8fc6a 100644
--- a/test/core/RegistryTest.cpp
+++ b/test/core/RegistryTest.cpp
@@ -31,9 +31,9 @@ namespace ousia {
namespace {
class TestParser : public Parser {
protected:
- Rooted<Node> doParse(CharReader &reader, ParserContext &ctx) override
+ void doParse(CharReader &reader, ParserContext &ctx) override
{
- return new Node{ctx.getManager()};
+ // Stub
}
};
}
diff --git a/test/core/StandaloneEnvironment.hpp b/test/core/StandaloneEnvironment.hpp
index eaaa9bf..ef07379 100644
--- a/test/core/StandaloneEnvironment.hpp
+++ b/test/core/StandaloneEnvironment.hpp
@@ -54,7 +54,7 @@ struct StandaloneEnvironment {
logger.setSourceContextCallback(NullSourceContextCallback);
}
- Rooted<Node> parse(const std::string &path,
+ NodeVector<Node> parse(const std::string &path,
const std::string mimetype, const std::string rel,
const RttiSet &supportedTypes)
{
diff --git a/test/core/resource/ResourceRequestTest.cpp b/test/core/resource/ResourceRequestTest.cpp
index 0bb34be..dac7a28 100644
--- a/test/core/resource/ResourceRequestTest.cpp
+++ b/test/core/resource/ResourceRequestTest.cpp
@@ -41,17 +41,17 @@ static TerminalLogger logger(std::cerr, true);
namespace {
class ModuleParser : public Parser {
protected:
- Rooted<Node> doParse(CharReader &reader, ParserContext &ctx) override
+ void doParse(CharReader &reader, ParserContext &ctx) override
{
- return nullptr; // Stub
+ // Stub
}
};
class DocumentParser : public Parser {
protected:
- Rooted<Node> doParse(CharReader &reader, ParserContext &ctx) override
+ void doParse(CharReader &reader, ParserContext &ctx) override
{
- return nullptr; // Stub
+ // Stub
}
};