This has two effects:
1) This significantly improves the performance of ApprovalTests
run in WSL, because running the massively multi-reporter
test would cause lots of small and parallel writes across the
WSL-Windows FS boundary, completely mudering performance.
2) ApprovalTests can be run from multiple build dirs in parallel,
as long as they do not fail. However, if they do fail,
the multiple runs will still step on each other toes when
writing the unapproved files for user.
This is primarily done to support new `std::*_ordering` types,
but the refactoring also supports any other type with this
property.
The compilation overhead is surprisingly low. Testing it with
clang on a Linux machine, compiling our SelfTest project takes
only 2-3% longer with these changes than it takes otherwise.
Closes#2555
They also got slapped with the `[approvals]` tag in the process,
because we have too many approval tests and want less of them,
and these particular tests don't bring much value.
Related to #2090
This changes the compact reporter's summary of test run totals to use
the same format as the console reporter. This means that while output is
no longer on a single line (two instead), it now includes totals for
`failedButOk` test cases and assertions, which were previously missing.
With the changes to how `-ffile-prefix-map` is detected, Catch2 started propagating the flag to its dependents, which isn't the desired behaviour, the normalization should only apply to Catch2's impl.
There is an increasing number of places where Catch2 wants to parse
strings into numbers, but being stuck in C++14 world, we do not
have good stdlib facilities to do this (`strtoul` and `stoul`
are both bad).
I came here looking for a way to use a fixture. But what I really wanted was better done in the SECTION macro. Feels like a link right at the top would've made it clearer faster.
the current implementation has two problems:
* `clang-cl` does not know `-ffile-prefix-map`, but in CMake it is
reported as "Clang", so the compiler will warn about an unknown
compiler option.
* XCode's clang in CMake is reported as "AppleClang", so it is not picked
up as "Clang", so it is not passed `-ffile-prefix-map`, even though
it supports it.
Also changed the map so that the normalized `__FILE__` paths are the same
as what the approval tests normalize paths into.
Co-authored-by: Martin Hořeňovský <martin.horenovsky@gmail.com>