From 2eec59a47ec36e5e4f921ca91284942b4d7d521b Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Sun, 18 Jan 2015 21:42:49 +0100 Subject: Fixed bugs in definition of Project, added reference to Project to ParserContext --- test/plugins/css/CSSParserTest.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'test/plugins/css') diff --git a/test/plugins/css/CSSParserTest.cpp b/test/plugins/css/CSSParserTest.cpp index 54c359b..84522b3 100644 --- a/test/plugins/css/CSSParserTest.cpp +++ b/test/plugins/css/CSSParserTest.cpp @@ -45,7 +45,8 @@ TEST(CSSParser, testParseSelectors) // parse the data. CSSParser instance; - Rooted root = instance.parse(data, ctx).cast(); + Rooted root = + instance.parse(data, ctx.context).cast(); // we expect three children of the root node overall. ASSERT_EQ(3U, root->getEdges().size()); @@ -156,7 +157,7 @@ TEST(CSSParser, testParseCSS) CSSParser instance; CharReader reader{input}; Rooted root = - instance.parse(reader, ctx).cast(); + instance.parse(reader, ctx.context).cast(); // we expect three children of the root node overall. ASSERT_EQ(3U, root->getEdges().size()); @@ -269,14 +270,11 @@ void assertException(std::string css) { ScopedLogger sl(logger, "test.css", SourceLocation{}, CharReader::contextCallback, &reader); - Scope scope; - Registry registry(logger); - Manager manager; - ParserContext ctx{scope, registry, logger, manager}; + StandaloneParserContext ctx(sl); CSSParser instance; try { - instance.parse(reader, ctx).cast(); + instance.parse(reader, ctx.context).cast(); } catch (LoggableException ex) { logger.log(ex); -- cgit v1.2.3