summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-12-13 23:37:43 +0100
committerlouiz’ <louiz@louiz.org>2016-12-13 23:37:43 +0100
commit6b245ee64a828dd86da0acf6ffb56b618b170ca5 (patch)
tree43e691c707c304b4d20a07a397338a23845eae4d /tests
parent810c4343c72b0a5ac61155f2a71a969fc5f8ea9c (diff)
downloadbiboumi-6b245ee64a828dd86da0acf6ffb56b618b170ca5.tar.gz
biboumi-6b245ee64a828dd86da0acf6ffb56b618b170ca5.tar.bz2
biboumi-6b245ee64a828dd86da0acf6ffb56b618b170ca5.tar.xz
biboumi-6b245ee64a828dd86da0acf6ffb56b618b170ca5.zip
Switch back to using std::cout instead of std::clog
Diffstat (limited to 'tests')
-rw-r--r--tests/logger.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/logger.cpp b/tests/logger.cpp
index bde28c9..1d59a22 100644
--- a/tests/logger.cpp
+++ b/tests/logger.cpp
@@ -23,14 +23,14 @@ TEST_CASE("Basic logging")
Config::set("log_level", "0");
WHEN("we log some debug text")
{
- IoTester<std::ostream> out(std::clog);
+ IoTester<std::ostream> out(std::cout);
log_debug("deb", "ug");
THEN("debug logs are written")
CHECK(out.str() == debug_header + "tests/logger.cpp:" + std::to_string(__LINE__ - 2) + ":\tdebug\n");
}
WHEN("we log some errors")
{
- IoTester<std::ostream> out(std::clog);
+ IoTester<std::ostream> out(std::cout);
log_error("err", 12, "or");
THEN("error logs are written")
CHECK(out.str() == error_header + "tests/logger.cpp:" + std::to_string(__LINE__ - 2) + ":\terr12or\n");
@@ -41,14 +41,14 @@ TEST_CASE("Basic logging")
Config::set("log_level", "3");
WHEN("we log some debug text")
{
- IoTester<std::ostream> out(std::clog);
+ IoTester<std::ostream> out(std::cout);
log_debug(123, "debug");
THEN("nothing is written")
CHECK(out.str().empty());
}
WHEN("we log some errors")
{
- IoTester<std::ostream> out(std::clog);
+ IoTester<std::ostream> out(std::cout);
log_error(123, " errors");
THEN("error logs are still written")
CHECK(out.str() == error_header + "tests/logger.cpp:" + std::to_string(__LINE__ - 2) + ":\t123 errors\n");