diff options
author | gabime <gmelman1@gmail.com> | 2019-11-03 16:19:59 +0300 |
---|---|---|
committer | gabime <gmelman1@gmail.com> | 2019-11-03 16:19:59 +0300 |
commit | cae6c9ab361ffee0e2d7d2e4b89a333c88a1019d (patch) | |
tree | 4f26e1fe05016c7c956d553c1240bfc9e4c3b220 /tests | |
parent | 15b393193ad06d839d94011a03960c16369262fd (diff) |
Removed lazy argument evaluation from macros
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_macros.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/test_macros.cpp b/tests/test_macros.cpp index 83a95dbd..b18c1cbf 100644 --- a/tests/test_macros.cpp +++ b/tests/test_macros.cpp @@ -40,20 +40,20 @@ TEST_CASE("disable param evaluation", "[macros]") SPDLOG_TRACE("Test message {}", throw std::runtime_error("Should not be evaluated")); } -TEST_CASE("compile with reference to logger", "[macros]") +TEST_CASE("pass logger pointer", "[macros]") { auto logger = spdlog::create<spdlog::sinks::null_sink_mt>("refmacro"); - auto& ref = *logger; + auto &ref = *logger; SPDLOG_LOGGER_TRACE(&ref, "Test message 1"); SPDLOG_LOGGER_DEBUG(&ref, "Test message 2"); } // ensure that even if right macro level is on- don't evaluate if the logger's level is not high enough -TEST_CASE("disable param evaluation2", "[macros]") -{ - auto logger = std::make_shared<spdlog::logger>("test-macro"); - logger->set_level(spdlog::level::off); - int x = 0; - SPDLOG_LOGGER_DEBUG(logger, "Test message {}", ++x); - REQUIRE(x == 0); -} +//TEST_CASE("disable param evaluation2", "[macros]") +//{ +// auto logger = std::make_shared<spdlog::logger>("test-macro"); +// logger->set_level(spdlog::level::off); +// int x = 0; +// SPDLOG_LOGGER_DEBUG(logger, "Test message {}", ++x); +// REQUIRE(x == 0); +//} |