mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-25 10:01:33 +08:00
Update test_pattern_formatter.cpp
This commit is contained in:
parent
97cdbc45e8
commit
e8a39c894f
@ -56,6 +56,6 @@ TEST_CASE("date MM/DD/YY ", "[pattern_formatter]")
|
|||||||
auto formatter = std::make_shared<spdlog::pattern_formatter>("%D %v", spdlog::pattern_time_type::local, "\n");
|
auto formatter = std::make_shared<spdlog::pattern_formatter>("%D %v", spdlog::pattern_time_type::local, "\n");
|
||||||
auto now_tm = spdlog::details::os::localtime();
|
auto now_tm = spdlog::details::os::localtime();
|
||||||
std::stringstream oss;
|
std::stringstream oss;
|
||||||
oss << std::setfill('0') << std::setw(2) << now_tm.tm_mon + 1 << "/" << now_tm.tm_mday << "/" << (now_tm.tm_year + 1900) % 1000 << " Some message\n";
|
oss << std::setfill('0') << std::setw(2) << now_tm.tm_mon + 1 << "/" << std::setw(2) << now_tm.tm_mday << "/" << std::setw(2) << (now_tm.tm_year + 1900) % 1000 << " Some message\n";
|
||||||
REQUIRE(log_to_str("Some message", formatter) == oss.str());
|
REQUIRE(log_to_str("Some message", formatter) == oss.str());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user