Commit Graph
4593 Commits
Author SHA1 Message Date
Tyson Jones bd2d918f32 patched >2-digit tag-count padding in base reporter
Passing the CLI argument '--list-tags' outputs a list like:

```
All available tags:
  11  [mytag]
   4  [myothertag]
2 tags
```

However, the width of the tag-count column was previously hardcoded to 2, such that the formatting broke (with the tag names awkwardly misaligned/displaced) for 3+ digit tag counts. This occurred whenever a tag contains one hundred or more tests, and would result in formatting like:

```
All available tags:
  11  [mytag]
  100  [myjumbotag]
   4  [myothertag]
3 tags
```

This patch pre-computes the maximum number of digits among the tag counts, expanding the padding when there are more than 100 tests in a tag (and handling when tags are empty). It now outputs e.g.

```
All available tags:
   11  [mytag]
  100  [myjumbotag]
    4  [myothertag]
3 tags
```
2025-07-02 14:13:07 +02:00
Jean-Michaël CelerierandMartin Hořeňovský d134b0cae3 clang: do not issue bogus warnings about integer manipulation in hash functions with fsanitize=undefined/integer (#2965)
With -fsanitize=integer every over/under-flowing integer manipulation triggers a warning.
This is extremely useful as it allows to find some non-obvious bugs such as

    for(size_t i = 0; i < N - 1; i++) { ... }

But it comes with a lot of false positives, for instance with every hash function
doing shifting on unsigned integer. Random number generators are also often detected
with this sanitizer.

This marks a few of these functions as safe in this case.

Co-authored-by: Martin Hořeňovský <martin.horenovsky@gmail.com>
2025-07-02 13:30:36 +02:00
Eisuke Kawashima ceed26842b fix(python): fix invalid escape sequences 2025-06-24 15:32:27 -06:00
Victor Chernyakin 04cbcfa1d1 Vectorize artwork 2025-06-21 13:30:38 -06:00
Eisuke Kawashima 416b075211 fix: make deleted member function public 2025-06-15 13:26:38 -06:00
Eisuke Kawashima 334827eb53 Replace deprecated FindPythonInterp with FindPython3
fix #2755

https://cmake.org/cmake/help/v3.16/module/FindPythonInterp.html
2025-06-15 13:23:27 -06:00
Chris Thrasher ac207fc90f Use latest release in docs 2025-06-15 13:05:41 -06:00
Eisuke Kawashima 1de7d0ed7b Remove redundant override specifier from functions that are declared final 2025-06-14 18:42:43 -06:00
Chris Thrasher 65cd203926 Stop testing with GCC 7 and 8
Support for GCC 7 and 8 can continue on an as-needed basis. The
goal is not to explicitly break support for such compilers. Chances
are they will continue to compile Catch2 for some time into the
future. Rather, it no longer seems a prudent use of resources to
continuously test with these compilers.
2025-06-14 11:44:33 -06:00
Vertexwahn 3013cb897b Bazel support: Add license annotations 2025-06-01 21:36:26 -06:00
Martin Hořeňovský 74fcff6e5b Use Start-BitsTransfer for downloading OpenCppCoverage instead
The old `Start-FileDownload` was no longer recognized by the pswh
version on my local machine, this updates the OpenCppCoverage install
script to use a still usable cmdlet.
2025-05-02 22:58:36 +02:00
Chris Thrasher 5abfc0aa9c Add return code constants to API 2025-04-29 09:26:28 -06:00
Martin Hořeňovský 1e7b879fae Small include cleanup 2025-04-29 13:15:34 +02:00
ZXShady 4ff57aba42 Use variable templates 2025-04-27 21:14:04 -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