spdlog
spdlog copied to clipboard
spdlog-utests do not respect defined SPDLOG_LEVEL_NAMES in the tweakme.h
level_to_string_view
-------------------------------------------------------------------------------
spdlog\tests\test_misc.cpp(46)
...............................................................................
spdlog\tests\test_misc.cpp(47): FAILED:
REQUIRE( spdlog::level::to_string_view(spdlog::level::trace) == "trace" )
with expansion:
"TRC" == "trace"
Thank you for the report. It's surprising that no one noticed this issue.
As a unit test, I believe it should not be affected by tweakme.h.
Could you please verify if the test passes after adding #undef SPDLOG_LEVEL_NAMES and #undef SPDLOG_SHORT_LEVEL_NAMES after #define SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_DEBUG in tests/includes.h?
If you can fix the test, we would appreciate it if you could submit a PR.
https://github.com/gabime/spdlog/blob/f1d748e5e3edfa4b1778edea003bac94781bc7b7/tests/includes.h#L24
#define SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_DEBUG
+#undef SPDLOG_LEVEL_NAMES
+#undef SPDLOG_SHORT_LEVEL_NAMES