From 67c3618e593f88eb8177404475586735902d693f Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Sun, 25 Jan 2015 18:57:19 +0100 Subject: 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 --- test/core/RegistryTest.cpp | 2 +- test/core/parser/StandaloneParserContext.hpp | 12 +++++++----- test/plugins/css/CSSParserTest.cpp | 4 +--- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'test') 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 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; ParserScope scope; - Rooted 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(); -- cgit v1.2.3