mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 16:35:45 +08:00
Fixed tests
This commit is contained in:
parent
d8eb0558e9
commit
fcb661d0e9
@ -86,7 +86,7 @@ TEST_CASE("periodic flush", "[periodic_flush]")
|
|||||||
auto test_sink = std::static_pointer_cast<sinks::test_sink_mt>(logger->sinks()[0]);
|
auto test_sink = std::static_pointer_cast<sinks::test_sink_mt>(logger->sinks()[0]);
|
||||||
|
|
||||||
spdlog::flush_every(std::chrono::seconds(1));
|
spdlog::flush_every(std::chrono::seconds(1));
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(1500));
|
std::this_thread::sleep_for(std::chrono::milliseconds(1250));
|
||||||
REQUIRE(test_sink->flush_counter() == 1);
|
REQUIRE(test_sink->flush_counter() == 1);
|
||||||
spdlog::flush_every(std::chrono::seconds(0));
|
spdlog::flush_every(std::chrono::seconds(0));
|
||||||
spdlog::drop_all();
|
spdlog::drop_all();
|
||||||
|
@ -110,4 +110,5 @@ TEST_CASE("disable automatic registration", "[registry]")
|
|||||||
REQUIRE(logger1->level() == log_level);
|
REQUIRE(logger1->level() == log_level);
|
||||||
REQUIRE(logger2->level() == log_level);
|
REQUIRE(logger2->level() == log_level);
|
||||||
spdlog::set_level(spdlog::level::info);
|
spdlog::set_level(spdlog::level::info);
|
||||||
|
spdlog::set_automatic_registration(true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user