| 58 | }; |
| 59 | |
| 60 | BOOST_AUTO_TEST_CASE(logging_timer) |
| 61 | { |
| 62 | SetMockTime(1); |
| 63 | auto micro_timer = BCLog::Timer<std::chrono::microseconds>("tests", "end_msg"); |
| 64 | SetMockTime(2); |
| 65 | BOOST_CHECK_EQUAL(micro_timer.LogMsg("test micros"), "tests: test micros (1000000μs)"); |
| 66 | |
| 67 | SetMockTime(1); |
| 68 | auto ms_timer = BCLog::Timer<std::chrono::milliseconds>("tests", "end_msg"); |
| 69 | SetMockTime(2); |
| 70 | BOOST_CHECK_EQUAL(ms_timer.LogMsg("test ms"), "tests: test ms (1000.00ms)"); |
| 71 | |
| 72 | SetMockTime(1); |
| 73 | auto sec_timer = BCLog::Timer<std::chrono::seconds>("tests", "end_msg"); |
| 74 | SetMockTime(2); |
| 75 | BOOST_CHECK_EQUAL(sec_timer.LogMsg("test secs"), "tests: test secs (1.00s)"); |
| 76 | } |
| 77 | |
| 78 | BOOST_FIXTURE_TEST_CASE(logging_LogPrintf_, LogSetup) |
| 79 | { |
nothing calls this directly
no test coverage detected