mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-30 02:19:35 +08:00
clang format
This commit is contained in:
@@ -2,8 +2,7 @@
|
||||
#include "test_sink.h"
|
||||
#include "spdlog/async.h"
|
||||
|
||||
TEST_CASE("time_point1", "[time_point log_msg]")
|
||||
{
|
||||
TEST_CASE("time_point1", "[time_point log_msg]") {
|
||||
std::shared_ptr<spdlog::sinks::test_sink_st> test_sink(new spdlog::sinks::test_sink_st);
|
||||
spdlog::logger logger("test-time_point", test_sink);
|
||||
|
||||
@@ -13,8 +12,7 @@ TEST_CASE("time_point1", "[time_point log_msg]")
|
||||
|
||||
// all the following should have the same time
|
||||
test_sink->set_delay(std::chrono::milliseconds(10));
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
for (int i = 0; i < 5; i++) {
|
||||
spdlog::details::log_msg msg{tp, source, "test_logger", spdlog::level::info, "message"};
|
||||
test_sink->log(msg);
|
||||
}
|
||||
@@ -23,7 +21,8 @@ TEST_CASE("time_point1", "[time_point log_msg]")
|
||||
logger.log(tp, source, spdlog::level::info, "formatted message");
|
||||
logger.log(tp, source, spdlog::level::info, "formatted message");
|
||||
logger.log(tp, source, spdlog::level::info, "formatted message");
|
||||
logger.log(source, spdlog::level::info, "formatted message"); // last line has different time_point
|
||||
logger.log(source, spdlog::level::info,
|
||||
"formatted message"); // last line has different time_point
|
||||
|
||||
// now the real test... that the times are the same.
|
||||
std::vector<std::string> lines = test_sink->lines();
|
||||
|
Reference in New Issue
Block a user