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>
* meson: run through muon's fmt to fix formatting
* meson: switch arrays to files
Allows muon to alphabetically sort files. switch headers back to arrays
as split() can only be used on strings.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
The Meson[1] build system makes it easier incorporate third-party
libaries into a project if they also build using Meson.
Let's add a minimal Meson build that's compatible with the CMake build,
along with a GitHub workflow to check that it builds and that at least
the simplest SelfTest runs.
The handling of catch_user_config.hpp is inspired by BUILD.bazel and
doesn't attempt to support any configuratons options. Such features
could be added later.
Meson strongly discourages using wildcards to specify sources, so the
source and header lists are copied from CMakeLists.txt.
Add a new test workflow to test the Meson builds. I was unable to get
these tests to pass with Ubuntu 20.04, so they use Ubuntu 22.04.
I'm neither a CMake nor a Meson expert, but the results seem to work for
me.
[1] https://mesonbuild.com/
Co-authored-by: Mike Crowe <mcrowe@brightsign.biz>
* Suppress clang-tidy *-avoid-c-arrays for TEMPLATE_TEST_CASE
* Made globalRegistrar `const` to avoid `cppcoreguidelines-avoid-non-const-global-variables`
Fixes#2095