summaryrefslogtreecommitdiff
path: root/tests/logger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/logger.cpp')
-rw-r--r--tests/logger.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/logger.cpp b/tests/logger.cpp
index 7ae4f03..1d59a22 100644
--- a/tests/logger.cpp
+++ b/tests/logger.cpp
@@ -31,9 +31,9 @@ TEST_CASE("Basic logging")
WHEN("we log some errors")
{
IoTester<std::ostream> out(std::cout);
- log_error("error");
+ log_error("err", 12, "or");
THEN("error logs are written")
- CHECK(out.str() == error_header + "tests/logger.cpp:" + std::to_string(__LINE__ - 2) + ":\terror\n");
+ CHECK(out.str() == error_header + "tests/logger.cpp:" + std::to_string(__LINE__ - 2) + ":\terr12or\n");
}
}
GIVEN("A logger with log_level 3")
@@ -42,16 +42,16 @@ TEST_CASE("Basic logging")
WHEN("we log some debug text")
{
IoTester<std::ostream> out(std::cout);
- log_debug("debug");
+ log_debug(123, "debug");
THEN("nothing is written")
CHECK(out.str().empty());
}
WHEN("we log some errors")
{
IoTester<std::ostream> out(std::cout);
- log_error("error");
+ log_error(123, " errors");
THEN("error logs are still written")
- CHECK(out.str() == error_header + "tests/logger.cpp:" + std::to_string(__LINE__ - 2) + ":\terror\n");
+ CHECK(out.str() == error_header + "tests/logger.cpp:" + std::to_string(__LINE__ - 2) + ":\t123 errors\n");
}
}
}