diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/core/LoggerTest.cpp | 16 | ||||
-rw-r--r-- | test/plugins/xml/XmlParserTest.cpp | 1 |
2 files changed, 13 insertions, 4 deletions
diff --git a/test/core/LoggerTest.cpp b/test/core/LoggerTest.cpp index b4549ed..abb76de 100644 --- a/test/core/LoggerTest.cpp +++ b/test/core/LoggerTest.cpp @@ -26,7 +26,7 @@ namespace ousia { struct Pos { int line, column; - Pos(int line, int column) : line(line), column(column) {}; + Pos(int line, int column) : line(line), column(column){}; int getLine() const { return line; } int getColumn() const { return column; } }; @@ -52,13 +52,23 @@ TEST(TerminalLogger, log) logger.fatalError("This is a test fatal error!", 10, 20); try { - throw LoggableException{"A fatal exception"}; + throw LoggableException{"An exception"}; } catch (const LoggableException &ex) { logger.log(ex); } - logger.logAt(Severity::ERROR, "This is a positioned error", Pos(10, 20)); + try { + throw LoggableException{"An exception at position", Pos(10, 20)}; + } + catch (const LoggableException &ex) { + logger.log(ex); + } + + logger.logAt(Severity::ERROR, "This is a positioned log message", + Pos(10, 20)); + logger.debugAt("This is a positioned debug message", Pos(10, 20)); + logger.noteAt("This is a positioned log error", Pos(10, 20)); } } diff --git a/test/plugins/xml/XmlParserTest.cpp b/test/plugins/xml/XmlParserTest.cpp index ecc9438..7dc8c24 100644 --- a/test/plugins/xml/XmlParserTest.cpp +++ b/test/plugins/xml/XmlParserTest.cpp @@ -37,7 +37,6 @@ TEST(XmlParser, mismatchedTagException) } catch (ParserException ex) { ASSERT_EQ(2, ex.line); - ASSERT_FALSE(ex.fatal); hadException = true; } ASSERT_TRUE(hadException); |