summaryrefslogtreecommitdiff
path: root/test/plugins/xml/XmlParserTest.cpp
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-01-01 18:06:04 +0100
committerAndreas Stöckel <andreas@somweyr.de>2015-01-01 18:06:04 +0100
commit4484f6deea0e098a140e878484d020bec839d1bd (patch)
treef3e8b480a533b4158abe9918f16d9988c6b463b6 /test/plugins/xml/XmlParserTest.cpp
parent377b7b0213733307927bec9e39c8ccb063e6ba50 (diff)
Using CharReader instead of inputstream in Parser function
Diffstat (limited to 'test/plugins/xml/XmlParserTest.cpp')
-rw-r--r--test/plugins/xml/XmlParserTest.cpp17
1 files changed, 11 insertions, 6 deletions
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("<document>\n</document2>", 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);
+ }
}
}
}