1
0
mirror of https://github.com/catchorg/Catch2.git synced 2025-04-28 19:53:52 +00:00

4580 Commits

Author SHA1 Message Date
Chris Thrasher
6244a357ea
Add return code constants to API 2025-04-27 22:03:50 -06:00
Chris Thrasher
dde8220613
Add VS 2025 CI jobs 2025-04-27 11:08:50 -06:00
Chris Thrasher
cecb02e68f
Use presets in CI 2025-04-27 11:08:48 -06:00
Chris Thrasher
66085dac55
Simplify Windows CI jobs 2025-04-27 11:08:45 -06:00
Chris Thrasher
5a6d70eebb
Remove unused headers 2025-04-27 11:08:41 -06:00
Chris Thrasher
10d1a2750c
Simplify Linux CI jobs 2025-04-26 22:46:48 -06:00
Chris Thrasher
c17d69f813
Simplify macOS CI jobs 2025-04-26 22:46:45 -06:00
Chris Thrasher
4c93a595a1
Fix typos 2025-04-26 22:46:42 -06:00
Chris Thrasher
e8f4b60e62
Add more useful preset settings 2025-04-26 22:46:21 -06:00
Chris Thrasher
371b11b5a8
Modernize tools/misc/CMakeLists.txt 2025-04-26 22:46:13 -06:00
Chris Thrasher
8039e3ea1e
Prevent unnecessarily finding C compiler 2025-04-26 12:05:22 -06:00
Chris Thrasher
1d3bfb324d
Inherit C++14 requirement from upstream target 2025-04-26 11:00:03 -06:00
Chris Thrasher
5c97a8583d
Use more modern -S for specifying CMake source dir 2025-04-26 10:59:42 -06:00
Chris Thrasher
8cfca70ae8
Fix formatting of CMake files
2 spaces seems to be the more common indentation level so that's what
I unified around.
2025-04-26 10:38:36 -06:00
Chris Thrasher
6aac11e17d
Use CTest --output-on-failure flag 2025-04-26 10:37:44 -06:00
Chris Thrasher
ec571515c8
Don't fail CI fast 2025-04-26 10:37:36 -06:00
Chris Thrasher
edb6f80867
Export compile commands 2025-04-26 10:37:30 -06:00
Chris Thrasher
25b86ef3fd
Upgrade CI runners to Ubuntu 22 2025-04-25 23:14:06 -06:00
Martin Hořeňovský
4c8671cfbb
Add MAINTAINERS.md
Closes #2970
2025-04-18 16:29:44 +02:00
Mark Jansen
5b3b228603 Update generator docs with relevant headers 2025-04-12 12:05:58 -06:00
Chris Thrasher
2b60af89e2
v3.8.1 v3.8.1 2025-04-08 12:40:18 -06:00
abhishekbelgaonkar23
f51dc98dfc Fix: Clang 19 -Wc++20-extensions warning (#2910) 2025-04-07 15:45:34 -06:00
Chris Thrasher
76f70b1403 Fix bug where catch_discover_tests fails when no TEST_CASEs are present 2025-03-12 14:03:56 -06:00
Martin Hořeňovský
914aeecfe2
v3.8.0 v3.8.0 2025-01-06 00:41:45 +01:00
Martin Hořeňovský
232e893785
Downgrade required CMake to 3.16
We still want to build VS 2017 through AppVeyor, and those images
have CMake 3.16.2 installed. We could install newer CMake as part
of the build, but since we don't use newer CMake features yet, this
is simpler.
2025-01-05 23:45:00 +01:00
Michal Bukovský
6e9c34aa20 add meson option to not install library 2025-01-05 20:10:45 +01:00
Martin Hořeňovský
7d7b2f89f2
Support adding test tags as CTest labels in catch_discover_tests
We also bump the minimum CMake version to 3.20 as per #2943
2025-01-05 20:02:00 +01:00
Martin Hořeňovský
b0d0aa43e6
Fix crash when stringifying pre 1970 dates on Windows
`gmtime*` on Windows fails on dates pre 1970, and because we didn't
check the return code, we would then pass invalid `tm` struct to
`strftime` causing it to assert.

Closes #2944
2025-01-05 16:04:38 +01:00
Martin Hořeňovský
a3b67a3abe
Migrate Bazel build to use Bzlmod 2025-01-05 16:03:22 +01:00
Holger Kaelberer
0321d2fce3 Catch.cmake: Remove redundant CTEST_FILE param 2024-11-22 11:05:50 +01:00
Thomas Braun
506276c592 Fix wrong reference to REGISTER_ENUM
This was renamed to CATCH_REGISTER_ENUM in 541f1ed1 (Only provide
CATCH_REGISTER_ENUM, 2019-04-21).
2024-11-12 23:29:54 +01:00
Martin Hořeňovský
f5cee49c71
Add test for iterators with const T as the value_type 2024-11-11 06:49:11 +01:00
Michal Bukovský
7bbd4b9075 Fix using from_range with std::vector<>::const_iterator 2024-11-09 18:46:07 +01:00
Martin Hořeňovský
119a7bbe53
Cleanup clang-tidy warning about enum sizes 2024-10-29 21:06:54 +01:00
Martin Hořeňovský
9c5a4cf44e
Enable CMake project folders for better target organization
Closes #2917
2024-10-27 23:07:55 +01:00
Martin Hořeňovský
e260288807
Allow disabling use of __builtin_constant_p in internal macros
Turns out that even in GCC, the expression in `__builtin_cosntant_p`
can end up evaluated and side-effects executed. To allow users to
work around this bug, I added a configuration option to disable its
use in internal macros.

Related to #2925
2024-10-27 20:27:03 +01:00
Martin Hořeňovský
7c2e1fb1b2
Update Intel Mac builds to macos-13 images for MacOS GitHub Actions
macos-12 images will be removed on 3.12.2024, and macos-14 no
longer support Intel-based MacOS in free (OSS) tier.
2024-10-26 16:55:15 +02:00
Pino Toscano
a6ee7e20cd Use isatty() when using GNU libc
While isatty() is a POSIX interface and theoretically could be used
more broadly than on Linux and macOS, use a conservative approach and
use it on any platform that uses GNU libc.
2024-10-19 20:36:19 +02:00
Sven Fischer
0b2af56271 Explicitly cast values of different types
In case the warning -Werror=conversion is active with GCC, the warnings
about "conversion from A to B may change value" lead to a compilation
error. This explicitly convert the values to address these warnings.
2024-10-14 21:37:35 +02:00
Stefan Haller
69d62abc9a Provide overloads for {Unordered}RangeEquals taking a std::initializer_list
This allows writing something like

  const auto v = calculateSomeVectorOfInts();
  CHECK_THAT(v, RangeEquals({1, 2, 3}));

Fixes #2915.
2024-10-14 21:02:03 +02:00
Stefan Haller
1e0ccb1b21 Use default parameter for comparison instead of overloads in {Unordered}RangeEquals
Saves some code duplication.
2024-10-14 21:02:03 +02:00
Stefan Haller
5ad66ada7b Fix typos in comments 2024-10-14 21:02:03 +02:00
Martin Hořeňovský
fa43b77429
v3.7.1 v3.7.1 2024-09-17 10:45:43 +02:00
Martin Hořeňovský
79f2d66ea3
Use SKIP_RETURN_CODE test property in catch_discover_tests
I also added `SKIP_IS_FAILURE` option to the `catch_discover_tests`
function, to allow users to get back the old behaviour.

Closes #2873
2024-09-17 09:35:43 +02:00
Martin Hořeňovský
e200443b84
Fix compilation error from missing include in xmlwriter.hpp
Fixes #2907
2024-09-15 22:17:39 +02:00
Martin Hořeňovský
ce22c0fe8a
Standardize exit codes for various failures
The main reason for this is to be able to distinguish between
different errors (or "errors") based on the return code. Before
this change, it was impossible to use the exit code to figure out
whether a test binary failed because all tests were skipped or
because exactly 4 assertions have failed.

This meant that using `catch_discover_tests` and telling it to
check for exit code == 4 to determine skipped tests could lead to
false negatives.
2024-09-13 21:33:45 +02:00
Martin Hořeňovský
18df97df00
Sprinkle some constexpr around to make Jason happy
Most of these will not matter in practice due to C++14 imposing
significant limitations on what else we can make constexpr, and we cannot
have references outliving the constexpr context either way.
2024-09-13 16:40:11 +02:00
Martin Hořeňovský
e97ebe62e7
Remove superfluous include 2024-09-13 16:39:55 +02:00
Martin Hořeňovský
b2b7cbdc31
Remove pointless internal macro 2024-09-13 16:39:53 +02:00
Martin Hořeňovský
412cad546a
Avoid needless copy of string in runContext::handleMessage 2024-09-13 16:39:51 +02:00