diff options
author | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2014-12-05 14:16:27 +0100 |
---|---|---|
committer | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2014-12-05 14:16:27 +0100 |
commit | 30765a8bbf30aafad89a632afc39966c5b4029b8 (patch) | |
tree | b9540230f7ac8ac68d66caf7d727e7413a56f631 /test/core | |
parent | fddd8a6fc3c9a7971111a345a83283a0a1662f9f (diff) | |
parent | bf59bc2edbb1f3f4d12bfbd8ed2663fbbb1900c0 (diff) |
Merge branch 'master' of somweyr.de:ousia
Diffstat (limited to 'test/core')
-rw-r--r-- | test/core/LoggerTest.cpp | 16 |
1 files changed, 13 insertions, 3 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)); } } |