-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce CATCH_CONFIG_PREFIX_MESSAGES to only prefix a few logging related macros. #2544
Conversation
std::min is defined in algorithm provides std::min. It appears to be transitively included for most platforms. For VxWorks however this explicit include is required.
Add missing include for VxWorks build.
… macros only. In contrast to CATCH_CONFIG_PREFIX_ALL, this will only prefix the following macros: I.e. INFO, UNSCOPED_INFO, WARN and CATCH_CAPTURE This is mainly useful for codebases that use INFO or WARN for their own logging macros.
Codecov Report
@@ Coverage Diff @@
## devel #2544 +/- ##
==========================================
- Coverage 91.20% 91.19% -0.01%
==========================================
Files 192 192
Lines 7843 7843
==========================================
- Hits 7153 7152 -1
- Misses 690 691 +1 |
Would be nice if you can add it also here: expand_template( expand_template( to ensure the Bazel build does not break. |
Like so? |
@horenmar Any comments regarding this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for taking so long to get around to this PR, but it happens to be in the sweet spot where there is no actual reason to reject it beyond me not seeing the value (the maintenance overhead and extra complexity is small enough), but also me not having a motivation to merge it (because I do not see the value & even if tiny, there are still costs).
In the end I decided to merge it, if one small change happens.
Description
The macro CATCH_CONFIG_PREFIX_ALL allows to prefix all of catch2's macros with CATCH_. This commit adds some granularity by introducing a new macro: CATCH_CONFIG_PREFIX_MESSAGES. It only prefixes a few debug message macros.
Why? It's rather usual that logging frameworks already use INFO/WARN macros themselves. This allows a user to avoid clashes without having to use the prefix everywhere else.
GitHub Issues