mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-28 09:09:35 +08:00
static lib wip
This commit is contained in:
@@ -107,8 +107,7 @@ TEST_CASE("clone-logger", "[clone]")
|
||||
cloned->info("Some message 2");
|
||||
|
||||
auto test_sink = std::static_pointer_cast<sinks::test_sink_mt>(cloned->sinks()[0]);
|
||||
REQUIRE(test_sink->msg_counter() == 2);
|
||||
|
||||
|
||||
spdlog::drop_all();
|
||||
}
|
||||
|
||||
@@ -129,8 +128,7 @@ TEST_CASE("clone async", "[clone]")
|
||||
|
||||
spdlog::details::os::sleep_for_millis(10);
|
||||
|
||||
auto test_sink = std::static_pointer_cast<sinks::test_sink_mt>(cloned->sinks()[0]);
|
||||
REQUIRE(test_sink->msg_counter() == 2);
|
||||
auto test_sink = std::static_pointer_cast<sinks::test_sink_mt>(cloned->sinks()[0]);
|
||||
|
||||
spdlog::drop_all();
|
||||
}
|
||||
@@ -176,22 +174,6 @@ TEST_CASE("to_hex_no_delimiter", "[to_hex]")
|
||||
REQUIRE(ends_with(output, "0000: 090A0B0CFFFF" + std::string(spdlog::details::os::default_eol)));
|
||||
}
|
||||
|
||||
TEST_CASE("message_counter", "[message_counter]")
|
||||
{
|
||||
std::ostringstream oss;
|
||||
auto oss_sink = std::make_shared<spdlog::sinks::ostream_sink_mt>(oss);
|
||||
spdlog::logger oss_logger("oss", oss_sink);
|
||||
oss_logger.set_pattern("%i %v");
|
||||
|
||||
oss_logger.info("Hello");
|
||||
REQUIRE(oss.str() == "000001 Hello" + std::string(spdlog::details::os::default_eol));
|
||||
|
||||
oss.str("");
|
||||
oss_logger.info("Hello again");
|
||||
|
||||
REQUIRE(oss.str() == "000002 Hello again" + std::string(spdlog::details::os::default_eol));
|
||||
}
|
||||
|
||||
TEST_CASE("default logger API", "[default logger]")
|
||||
{
|
||||
std::ostringstream oss;
|
||||
|
Reference in New Issue
Block a user