mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-25 10:01:33 +08:00
clang-format
This commit is contained in:
parent
79e105243c
commit
d25fb08a75
@ -12,7 +12,8 @@
|
|||||||
namespace spdlog {
|
namespace spdlog {
|
||||||
namespace details {
|
namespace details {
|
||||||
|
|
||||||
SPDLOG_INLINE log_msg::log_msg(spdlog::source_loc loc, string_view_t a_logger_name, spdlog::level::level_enum lvl, spdlog::string_view_t msg)
|
SPDLOG_INLINE log_msg::log_msg(
|
||||||
|
spdlog::source_loc loc, string_view_t a_logger_name, spdlog::level::level_enum lvl, spdlog::string_view_t msg)
|
||||||
: logger_name(a_logger_name)
|
: logger_name(a_logger_name)
|
||||||
, level(lvl)
|
, level(lvl)
|
||||||
, time(os::now())
|
, time(os::now())
|
||||||
|
@ -193,19 +193,19 @@ TEST_CASE("center_padded_short", "[pattern_formatter]")
|
|||||||
TEST_CASE("left_padded_huge", "[pattern_formatter]")
|
TEST_CASE("left_padded_huge", "[pattern_formatter]")
|
||||||
{
|
{
|
||||||
REQUIRE(log_to_str("Some message", "[%-300n] %v", spdlog::pattern_time_type::local, "\n") ==
|
REQUIRE(log_to_str("Some message", "[%-300n] %v", spdlog::pattern_time_type::local, "\n") ==
|
||||||
"[pattern_tester ] Some message\n");
|
"[pattern_tester ] Some message\n");
|
||||||
|
|
||||||
REQUIRE(log_to_str("Some message", "[%-300!n] %v", spdlog::pattern_time_type::local, "\n") ==
|
REQUIRE(log_to_str("Some message", "[%-300!n] %v", spdlog::pattern_time_type::local, "\n") ==
|
||||||
"[pattern_tester ] Some message\n");
|
"[pattern_tester ] Some message\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("left_padded_max", "[pattern_formatter]")
|
TEST_CASE("left_padded_max", "[pattern_formatter]")
|
||||||
{
|
{
|
||||||
REQUIRE(log_to_str("Some message", "[%-64n] %v", spdlog::pattern_time_type::local, "\n") ==
|
REQUIRE(log_to_str("Some message", "[%-64n] %v", spdlog::pattern_time_type::local, "\n") ==
|
||||||
"[pattern_tester ] Some message\n");
|
"[pattern_tester ] Some message\n");
|
||||||
|
|
||||||
REQUIRE(log_to_str("Some message", "[%-64!n] %v", spdlog::pattern_time_type::local, "\n") ==
|
REQUIRE(log_to_str("Some message", "[%-64!n] %v", spdlog::pattern_time_type::local, "\n") ==
|
||||||
"[pattern_tester ] Some message\n");
|
"[pattern_tester ] Some message\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test padding + truncate flag
|
// Test padding + truncate flag
|
||||||
@ -231,7 +231,7 @@ TEST_CASE("paddinng_truncate_funcname", "[pattern_formatter]")
|
|||||||
{
|
{
|
||||||
spdlog::sinks::test_sink_st test_sink;
|
spdlog::sinks::test_sink_st test_sink;
|
||||||
|
|
||||||
const char* pattern = "%v [%5!!]";
|
const char *pattern = "%v [%5!!]";
|
||||||
auto formatter = std::unique_ptr<spdlog::formatter>(new spdlog::pattern_formatter(pattern));
|
auto formatter = std::unique_ptr<spdlog::formatter>(new spdlog::pattern_formatter(pattern));
|
||||||
test_sink.set_formatter(std::move(formatter));
|
test_sink.set_formatter(std::move(formatter));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user