diff --git a/tests/test_async.cpp b/tests/test_async.cpp index 5ef66374..c422f39a 100644 --- a/tests/test_async.cpp +++ b/tests/test_async.cpp @@ -40,6 +40,26 @@ TEST_CASE("discard policy ", "[async]") REQUIRE(test_sink->msg_counter() < messages); } +TEST_CASE("discard policy using factory ", "[async]") +{ + using namespace spdlog; + //auto test_sink = std::make_shared(); + size_t queue_size = 2; + size_t messages = 1024; + { + //auto tp = std::make_shared(queue_size, 1); + auto logger = spdlog::create_async_nb("as2"); + for (size_t i = 0; i < messages; i++) + { + logger->info("Hello message #{}", i); + } + auto sink = std::static_pointer_cast(logger->sinks()[0]); + REQUIRE(sink->msg_counter() < messages); + } + + +} + TEST_CASE("flush", "[async]") { using namespace spdlog;