From 4484f6deea0e098a140e878484d020bec839d1bd Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Thu, 1 Jan 2015 18:06:04 +0100 Subject: Using CharReader instead of inputstream in Parser function --- test/plugins/xml/XmlParserTest.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'test/plugins/xml/XmlParserTest.cpp') diff --git a/test/plugins/xml/XmlParserTest.cpp b/test/plugins/xml/XmlParserTest.cpp index c5a7b10..886cccc 100644 --- a/test/plugins/xml/XmlParserTest.cpp +++ b/test/plugins/xml/XmlParserTest.cpp @@ -40,7 +40,7 @@ TEST(XmlParser, mismatchedTagException) p.parse("\n", ctx); } catch (LoggableException ex) { - ASSERT_EQ(2U, ex.loc.line); + ASSERT_EQ(2, ex.loc.line); hadException = true; } ASSERT_TRUE(hadException); @@ -66,11 +66,16 @@ TEST(XmlParser, namespaces) { StandaloneParserContext ctx(logger); XmlParser p; - - try { - p.parse(TEST_DATA, ctx); - } catch(LoggableException ex) { - logger.log(ex); + CharReader reader(TEST_DATA); + { + ScopedLogger sl(logger, "test.oxd", SourceLocation{}, + CharReader::contextCallback, &reader); + try { + p.parse(TEST_DATA, ctx); + } + catch (LoggableException ex) { + logger.log(ex); + } } } } -- cgit v1.2.3