Make hidden tags behave identically #1847
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
There are multiple tags to hide tests:
[.]
,[.something]
and[!hide]
. The Catch2 documentation (see here) states that, for compatibility and consistency purposes, if one of these is used for a test case, then all of them are added implicitly.However, this isn't actually how Catch2 behaves. As it turns out, if Catch2 encounters a hidden test, it will always make sure there is a
[.]
tag, but it will not add a[!hide]
tag. This means thatTEST_CASE("Something", "[!hide]")
will result in a[.][!hide]
signature, whereasTEST_CASE("Something2", "[.]")
will produce a[.]
signature.A simple way to observe this behaviour is to compile
SelfTest
and observe thatSelfTest [.]
andSelfTest [!hide]
produce different results.Changes
This PR enables
[.][!hide]
for all hidden tests by modifying the corresponding code ininternal/catch_test_case_info.cpp
. I have also updated the approval test results.