Make unexpected time type in BCLog::LogMsg() a compile-time error

This commit is contained in:
Martin Ankerl
2021-09-07 18:16:09 +02:00
committed by Jon Atack
parent bddae7e7ff
commit f530202353
2 changed files with 5 additions and 10 deletions

View File

@@ -28,11 +28,6 @@ BOOST_AUTO_TEST_CASE(logging_timer)
auto sec_timer = BCLog::Timer<std::chrono::seconds>("tests", "end_msg");
SetMockTime(2);
BOOST_CHECK_EQUAL(sec_timer.LogMsg("test secs"), "tests: test secs (1.00s)");
SetMockTime(1);
auto minute_timer = BCLog::Timer<std::chrono::minutes>("tests", "end_msg");
SetMockTime(2);
BOOST_CHECK_EQUAL(minute_timer.LogMsg("test minutes"), "Error: unexpected time type");
}
BOOST_AUTO_TEST_SUITE_END()