summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-01-25 18:57:19 +0100
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-01-25 18:57:19 +0100
commit67c3618e593f88eb8177404475586735902d693f (patch)
tree274bbc603aa2ec3bdb5b23294b090bf6d137f560 /test
parent1a6236c184d7ffe3551d417b656aee31b15d1948 (diff)
Restructures parser classes a little, removed Registry from ParserContext, gave a ResourceManager instance to the Project, using ResourceRequest when including or linking files, thought through how "including" and "linking" are handled
Diffstat (limited to 'test')
-rw-r--r--test/core/RegistryTest.cpp2
-rw-r--r--test/core/parser/StandaloneParserContext.hpp12
-rw-r--r--test/plugins/css/CSSParserTest.cpp4
3 files changed, 9 insertions, 9 deletions
diff --git a/test/core/RegistryTest.cpp b/test/core/RegistryTest.cpp
index 21195f2..1a23139 100644
--- a/test/core/RegistryTest.cpp
+++ b/test/core/RegistryTest.cpp
@@ -33,7 +33,7 @@ class TestParser : public Parser {
protected:
Rooted<Node> doParse(CharReader &reader, ParserContext &ctx) override
{
- return new Node{ctx.manager};
+ return new Node{ctx.getManager()};
}
};
}
diff --git a/test/core/parser/StandaloneParserContext.hpp b/test/core/parser/StandaloneParserContext.hpp
index 51cd1e6..cae843f 100644
--- a/test/core/parser/StandaloneParserContext.hpp
+++ b/test/core/parser/StandaloneParserContext.hpp
@@ -34,19 +34,21 @@ public:
Manager manager;
Logger logger;
Registry registry;
+ Rooted<Project> project;
ParserScope scope;
- Rooted<model::Project> project;
ParserContext context;
StandaloneParserContext()
- : project(new model::Project(manager)),
- context(scope, registry, logger, manager, project)
+ : project(new Project(manager, registry)),
+ context(project, scope, logger)
{
}
StandaloneParserContext(Logger &externalLogger)
- : project(new model::Project(manager)),
- context(scope, registry, externalLogger, manager, project){};
+ : project(new Project(manager, registry)),
+ context(project, scope, externalLogger)
+ {
+ }
};
}
diff --git a/test/plugins/css/CSSParserTest.cpp b/test/plugins/css/CSSParserTest.cpp
index 5132e51..46b4ebb 100644
--- a/test/plugins/css/CSSParserTest.cpp
+++ b/test/plugins/css/CSSParserTest.cpp
@@ -266,9 +266,7 @@ void assertException(std::string css)
CharReader reader(css);
TerminalLogger logger(std::cerr, true);
{
- GuardedLogger sl(logger);
- StandaloneParserContext ctx(sl);
-
+ StandaloneParserContext ctx(logger);
CSSParser instance;
try {
instance.parse(reader, ctx.context).cast<SelectorNode>();