From 87a44555b6d06a8af74b6af7698de2b0d742f737 Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 13 Oct 2017 02:15:49 +0300 Subject: [PATCH] fixed macro tests --- tests/test_macros.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/test_macros.cpp b/tests/test_macros.cpp index 7aeadc43..ba29d3d4 100644 --- a/tests/test_macros.cpp +++ b/tests/test_macros.cpp @@ -32,9 +32,16 @@ TEST_CASE("debug and trace with format strings", "[macros]]") logger->set_pattern("%v"); logger->set_level(spdlog::level::trace); - SPDLOG_TRACE(logger, "Test message 1"); +#if !defined(SPDLOG_FMT_PRINTF) + SPDLOG_TRACE(logger, "Test message {}", 1); //SPDLOG_DEBUG(logger, "Test message 2"); SPDLOG_DEBUG(logger, "Test message {}", 222); +#else + SPDLOG_TRACE(logger, "Test message %d", 1); + //SPDLOG_DEBUG(logger, "Test message 2"); + SPDLOG_DEBUG(logger, "Test message %d", 222); +#endif + logger->flush(); REQUIRE(ends_with(file_contents(filename), "Test message 222\n"));