https://github.com/philsquared/Catch

sort by:
Revision Author Date Message Commit Date
8ac8190 v3.5.3 01 March 2024, 21:07:10 UTC
b20b365 releaseCommon: fix SyntaxWarning: invalid escape sequence '\s' 01 March 2024, 20:24:45 UTC
4d8affc less copies and allocations in replaceInPlace 01 March 2024, 20:24:45 UTC
cde3509 Fix various useful clang-tidy warnings * bugprone-branch-clone * bugprone-copy-constructor-init * bugprone-empty-catch * bugprone-sizeof-expression * bugprone-switch-missing-default-case * bugprone-unused-local-non-trivial-variable * clang-analyzer-core.uninitialized.Assign * clang-analyzer-cplusplus.Move * clang-analyzer-optin.cplusplus.VirtualCall * modernize-loop-convert * modernize-raw-string-literal * modernize-use-equals-default * modernize-use-override * modernize-use-using * performance-avoid-endl * performance-inefficient-string-concatenation * performance-inefficient-vector-operation * performance-noexcept-move-constructor * performance-unnecessary-value-param (and improve generator example) * readability-duplicate-include * readability-inconsistent-declaration-parameter-name * readability-non-const-parameter * readability-redundant-casting * readability-redundant-member-init * readability-redundant-smartptr-get * readability-static-accessed-through-instance * unused variable in amalgamted tests 01 March 2024, 20:24:45 UTC
7677c16 ci: add clang-tidy run 01 March 2024, 20:24:45 UTC
92d3b23 add .clang-tidy config 01 March 2024, 20:24:45 UTC
dca8756 Evaluate argument of TEST_CASE in static-analysis mode 01 March 2024, 20:24:45 UTC
da303cc Evaluate argument of (DYNAMIC_)SECTION in static-analysis mode 01 March 2024, 20:24:45 UTC
c3fd4eb Update outdated tests for stringifying characters Previously the tests relied purely on output changes in approvals. Now the stringification output is checked directly as part of the unit tests. 01 March 2024, 14:09:11 UTC
fb51116 Avoid useless FDuration cast in benchmark analysis (#2823) Co-authored-by: Sven Johannsen <s.johannsen@bretgeld-engineering.de> 26 February 2024, 22:25:58 UTC
ed6ac8a Update AppVeyor exclusion branch pattern for Github Actions 23 February 2024, 19:52:04 UTC
e7913f1 Reinstate VS 2017 CI in AppVeyor 23 February 2024, 19:51:26 UTC
4f3871d Compiler compatibility for Visual Studio 2017 (v141) for template friend operator == (#2792). Make the operator not-friend is a sufficient solution. Closes #2792 23 February 2024, 19:45:32 UTC
f476bcb fix double promotion in catch_approx.cpp 21 February 2024, 14:02:13 UTC
024cfb3 Link Android's `log` with PRIVATE visibility (#2815) INTERFACE should be used on dependencies from other than our source files. PRIVATE should be used the include happens in our source files. In this case (src/catch2/internal/catch_debug_console.cpp:20) the include is from our source file. I encountered a issue with this when building Catch2 for Android in combination with BUILD_SHARED_LIBS. Changing the visibility to PRIVATE fixes the issue. 19 February 2024, 23:32:12 UTC
28c2f0b Mention x87 and ffast-math breaking FP random gen reproducibility 19 February 2024, 14:02:11 UTC
2e1b02a Document issue with spaceship operator in assertion and MSVC 19 February 2024, 14:02:10 UTC
82e9b9b Update CMake build instructions for current CMake version 19 February 2024, 14:02:08 UTC
031a163 Improve tutorial.md with link to two-file setup instructions. 19 February 2024, 14:01:14 UTC
562f310 Use the same Conan CMake target setup for Conan v1 and v2. This requires Conan v1 in version 1.53.0 or greater, but that should not pose a problem in practice. 17 February 2024, 22:04:04 UTC
62d4aec Conan v2 (#2805) * Removed Conan1 build.py file using conan package tools that are no longer supported * Working conan 1 and 2 build with the test package. updated the test_package to be updated to conan 2 and fixed missing cmake. Still need to check that the license file is packaged up and that the packages look identical before the changes * Removing debug prints and the license check that isn't working yet * Working license file copied over as it was before * Migrated the properties of cpp_info to conan 2. Keeping conan 1 support by checking the version of conan https://docs.conan.io/1/migrating_to_2.0/properties.html * Revert "Removed Conan1 build.py file using conan package tools that are no longer supported" This reverts commit a606d1dfe6e118199be8a371403717e3e42ad5da. * Need to add a set_version to parse the version from CMakeLists.txt Adding a package build yaml to ensure conan keeps building on 1 and 2 * Setting lowercase catch2 for pkg_config and cmake_target_name * Fixing the namespace for conan file cmake_target_name 17 February 2024, 15:42:44 UTC
b817497 Fix number of current reporter There are nine reporters in Catch2 3.5.2, Automake, compact, console, JSON, JUnit, SonarQube, TAP, TeamCity and XML. 16 February 2024, 20:29:57 UTC
4f1b24d clarify duration unit in docs 16 February 2024, 20:29:19 UTC
3157d6b Add Bazel instructions to integration docs (#2812) Co-authored-by: Fædon Jóhannes Sinis <fs@treble.tech> 16 February 2024, 15:58:09 UTC
4570fca Remove obsolete C++14 define There is no reason to have code conditional on C++14, because C++14 is the minimum supported language standard for v3. 12 February 2024, 23:01:19 UTC
0787132 Add documentation for the current state of decomposer 12 February 2024, 12:43:21 UTC
dc51386 Support literal-zero detectors using consteval int constructors This was originally motivated by `REQUIRE((a <=> b) == 0)` no longer compiling using MSVC. After some investigation, I found that they changed their implementation of the zero literal detector from the previous pointer-constructor with deleted other constructors, into one that uses `consteval` constructor from int. This breaks the previous detection logic, because now `is_foo_comparable<std::strong_ordering, int>` is true, but actually trying to compare them is a compile-time error... The solution was to make the decomposition `constexpr` and rely on a late C++20 DR that makes it so that `consteval` propagates up through the callstack of `constexpr` functions, until it either runs out of `constexpr` functions, or succeeds. However, the default handling of types in decomposition is to take a reference to them. This reference never becomes dangling, but because the constexpr evaluation engine cannot prove this, decomposition paths taking references to objects cannot be actually evaluated at compilation time. Thankfully we already did have a value-oriented decomposition path for arithmetic types (as these are common linkage-less types), so we could just explicitly spell out the `std::foo_ordering` types as also being supposed to be decomposed by-value. Two more fun facts about these changes 1) The original motivation of the MSVC change was to avoid trigering a `Wzero-as-null-pointer-constant` warning. I still do not believe this was a good decision. 2) Current latest version of MSVC does not actually implement the aforementioned C++20 DR, so even with this commit, MSVC cannot compile `REQUIRE((a <=> b) == 0)`. 11 February 2024, 23:52:53 UTC
bbba3d8 Disable CI for GCC 5 and 6 They can't compile the new constexpr decomposer because `ITransientExpression` has a defaulted virtual destructor. We could instead drop the virtual destructor - it only exists to silence static analysis tools complaining about having virtual functions without virtual destructor - but GCC 5 and 6 are positively ancient, so we drop them instead. 11 February 2024, 13:36:17 UTC
d937427 Disable tests for reproducible FP on non-SSE2 x86 targets Without SSE2 enabled, x86 targets will use x87 FPU, which breaks the tests checking for reproducible results from our random floating point number generators. The output is still reproducible, at least between binaries targetting x87, but the tests hardcode results for the whole pipeline being done in 32/64bit precision. Closes #2796 10 February 2024, 23:25:24 UTC
2a5de4e Fix OOB access when computing -# tag for file without extension It is unlikely that this would ever come in practice, but there is no reason to fix it. Related to #2798 10 February 2024, 22:27:19 UTC
1078e7e Fix clang-tidy `bugprone-chained-comparison` warnings This triggers when running clang-tidy's bugprone-* family of checks in code which uses Catch2 even if Catch2 headers are marked as SYSTEM headers due to how code expanded from macros is treated as first party even if the macro comes from a 3rd party library. The fix is luckily pretty straightforward. This check is added in clang-tidy-18 due for release later this year. 25 January 2024, 05:41:00 UTC
79205da Fix typo in release notes for v3.5.2 15 January 2024, 13:23:00 UTC
658acee Run tests on all cores in GHA jobs 15 January 2024, 13:22:45 UTC
05e10df v3.5.2 15 January 2024, 13:13:53 UTC
597ce12 reporters: silence -Wsubobject-linkage gcc emits `Wsubobject-linkage`, because the the publicly visible `TablePrinter` contains `ColumnInfo`, which is part of an anonymous namespace 15 January 2024, 08:57:30 UTC
05786fa Remove redundant destructors Classes will automatically inherit the virtual-ness of their base class destructors. If the base class already has a virtual destructor and the derived class needs default destructor semantics then the derived class can omit defining the destructor in favor of the compiler automatically defining it. This has an additional benefit of reenabling move semantics. The presence of a user-specified destructor automatically disables move operations. 14 January 2024, 22:33:51 UTC
d79bfa0 More readable config default 14 January 2024, 20:25:04 UTC
6ebdd8f Add Wsubobject-linkage to warning flags 14 January 2024, 20:22:09 UTC
7f931d6 Add tests for scaled ULP distance between +/- FLT/DBL_MAX 14 January 2024, 20:15:02 UTC
a0ef211 Cleanup types in resample 14 January 2024, 19:59:05 UTC
863c662 Fix adding Opts with | to lvalue Parser This is the recommended way of adding new Opts in our documentation for using custom main, but we did not compile the code to see if it works. We now compile the example as part of the BUILD_EXAMPLES option. Fixes #2787 02 January 2024, 22:27:13 UTC
f981c9c v3.5.1 31 December 2023, 14:15:04 UTC
b7b71ff Merge pull request #2786 from catchorg/redundant_link_libraries Fix clang warning about redundant link libraries 29 December 2023, 20:31:03 UTC
048d7f7 Fix clang warning about redundant link libraries 28 December 2023, 22:54:30 UTC
a9a94be Bazel support: Bump bazel-skylib version to 1.5.0 28 December 2023, 22:44:26 UTC
c8262e1 Handle linking to liblog when [cross] building for Android using meson. (#2784) * Alter meson for Android cross builds. * Handle liblog linking on Termux as well as the Android NDK. 28 December 2023, 22:40:42 UTC
08bdd43 Merge pull request #2785 from jpalus/optional-reproducible-build Make compiler flags for reproducible builds optional 28 December 2023, 20:20:41 UTC
1512dac Make compiler flags for reproducible builds optional no change in default behavior: -ffile-prefix-map is still added if supported by compiler but add option for disabling it as it breaks generic tools for extracting debuginfo/debugsource from build artifacts like: https://sourceware.org/git/?p=debugedit.git;a=blob;f=scripts/find-debuginfo.in 27 December 2023, 23:41:54 UTC
b52d978 Move-enable various parts of TextFlow This removes about 200 pointless copies from printing the help message (the original motivation for the change), and also nicely improves performance of the various reporters that depend on TextFlow. 27 December 2023, 20:43:49 UTC
eaafd07 Avoid copying TokenStreams while parsing The code is now even worse mess than before, due to the ad-hoc implementation of Result-ish type based on virtual functions in Clara, but it has dropped the allocations for empty binary down to 151. 27 December 2023, 20:14:12 UTC
5d637d4 Args and TokenStream use StringRefs instead of std::strings Because TokenStream is copied around a lot, moving it to use `StringRef` removes _a lot_ of allocations per `Opt` in the parser. Args are not copied around much, but changing them as well makes it obvious that they do not participate in the ownership. The changes add up to removing ~180 allocations for "empty" invocation of the test binary. (`./tests/ExtraTests/NoTests --allow-running-no-tests -o /dev/null` is down to 317 allocs) 27 December 2023, 15:24:33 UTC
cd3c7eb Use StringRef for Opt's optNames Removes another ~70 allocations. 26 December 2023, 15:03:22 UTC
5d5f42f Enable moving Opts into Parser This also required keeping the reference type in the fluent interface for Opts. Removes another ~40 allocations. 26 December 2023, 14:41:07 UTC
c57e349 Avoid copying Clara::Parser for every inserted Opt This prevents the full construction from being O(N^2) in number of `Opt`s, and also reduces the number of allocations for running no tests significantly: `tests/SelfTest`: 7705 -> 6095 `tests/ExtraTests/NoTests` 2215 -> 605 26 December 2023, 14:11:48 UTC
822c44a Cleanup help string construction in Clara * Clara::Opt::getHelpColumns returns single item It could never return multiple items, but for some reason it was wrapping that single item in a vector. * Use ReusableStringStream in Clara * Reserve HelpColumns ahead of time * Use StringRef for descriptions in HelpColumn type The combination of these changes ends up removing about 7% (~200) of allocations when Catch2 has to prepare output for `-h`. 26 December 2023, 13:57:29 UTC
2295d2c Store Opt/Arg hint and description as StringRef There is no good reason for these to be std::strings, as these are just (optional) constants for nice user output. This ends up reducing the allocations significantly. When measuring allocations when running no tests, the changes are `tests/SelfTest` 9213 -> 7705 `tests/ExtraTests/NoTests` 3723 -> 2215 26 December 2023, 13:40:45 UTC
2b69a3e Remove superfluous catch_session.hpp include in catch_sharding.hpp 26 December 2023, 13:02:19 UTC
c809cb4 Update Doxyfile for newer doxygen 23 December 2023, 10:27:46 UTC
9aadc3a Cleanup includes in sources Mainly just removes some unused includes, but sometimes the include is replaced by a smaller header instead. 23 December 2023, 10:23:32 UTC
64ade68 Remove superfluous duration_casts from benchmarking 21 December 2023, 17:40:00 UTC
680064d Don't store right end of the interval in uniform_integer_distribution 21 December 2023, 17:39:18 UTC
3acb8b3 More detailed examples for lifetimes in combined matcher exprs Example taken from #2777 13 December 2023, 16:24:23 UTC
3f23192 Fix typo in release notes 13 December 2023, 16:24:18 UTC
d40a328 Support MODULE.bazel (#2781) 13 December 2023, 16:22:56 UTC
53d0d91 v3.5.0 10 December 2023, 23:55:40 UTC
1648c30 Look just for 'Catch2 X.Y.Z' in doc placeholder update 10 December 2023, 23:52:22 UTC
d4e9fb8 Highlight that SECTIONs rerun the entire test case from beginning (#2749) 10 December 2023, 21:35:54 UTC
b606bc2 Remove obsolete section in limitations.md We no longer use `std::shuffle` to implement random test order, so a debug mode bug in old versions of libstdc++ cannot apply to us. 10 December 2023, 21:09:48 UTC
4ab0af8 Fix minor typos in documentation (#2769) Co-authored-by: Martin Hořeňovský <martin.horenovsky@gmail.com> 10 December 2023, 21:01:13 UTC
b7d70dd Ensure we always read 32 bit seed from std::random_device 10 December 2023, 20:37:12 UTC
a6f22c5 Remove static instance of std::random_device in Benchmark::analyse_samples 10 December 2023, 20:22:43 UTC
1887d42 Use our PCG32 RNG instead of mt19937 in Benchmark::analyse_samples 10 December 2023, 20:18:23 UTC
1774dbf Make it clearer that the JSON reporter is WIP 10 December 2023, 20:04:56 UTC
cb07ff9 Fix uniform_floating_point_distribution for unit ranges 10 December 2023, 18:53:46 UTC
ae4fe16 Make the user-facing random Generators reproducible Thanks to the new distributions, this is almost trivial change. 10 December 2023, 18:53:44 UTC
28c66fd Make uniform_floating_point_distribution reproducible By moving to use our `uniform_integer_distribution`, which is reproducible across different platforms, instead of the stdlib one which is not, we can provide reproducible results for `float`s and `double`s. Still no reproducibility for `long double`s, because those are too different across different platforms. 10 December 2023, 18:53:41 UTC
ed9d672 Add uniform_integer_distribution 10 December 2023, 18:53:39 UTC
04a829b Add helpers for implementing uniform integer distribution * Utility for extended mult n x n bits -> 2n bits * Utility to adapt output from URBG to target (unsigned) integral type * Utility to reorder signed values into unsigned type while keeping the order. 10 December 2023, 18:53:36 UTC
ab1b079 Add uniform_floating_point_distribution 10 December 2023, 17:44:12 UTC
d139b4f Add implementation of helpers for uniform float distribution Specifically we add * `gamma(a, b)`, which returns the magnitude of largest 1-ULP step in range [a, b]. * `count_equidistant_float(a, b, distance)`, which returns the number of equi-distant floats in range [a, b]. 10 December 2023, 17:44:10 UTC
bfd9f0f Move nextafter polyfill to polyfills.hpp 10 December 2023, 17:44:06 UTC
9a1e735 Add test showing literals and complex generators in one GENERATE 10 December 2023, 17:32:45 UTC
21d2da2 Fix typo in tostring.md specialiation -> specialization 09 December 2023, 20:00:24 UTC
d1d7414 Always run apt-get update before apt-get install The base images for GitHub Actions are updated weekly, but sometimes that is not enough to be able to install the packages we require. The recommended fix for this is to always run `apt-get update` before `apt-get install`. 09 December 2023, 11:05:45 UTC
dacbf4f Drop VS 2017 support We do not support specific compilers, but rather compilers with reasonable quality of their C++14 support. While developing the new random generators, I ran into issues with VS2017 where it rejects perfectly valid C++14 code, **and** the error does not point me in the right direction to try and work around the issue. It is time for VS2017 to go. 08 December 2023, 22:54:00 UTC
0520ff4 [DOC] Replaced broken link (fixes #2770) The original link is no longer available but a fork is still on GitHub. 02 December 2023, 21:05:48 UTC
4a7be16 Fix compilation on Xbox platforms Xbox does not support getenv 02 December 2023, 21:03:48 UTC
32d9ae2 JSONWriter deals in StringRefs instead of std::strings Together with liberal use of `_sr` UDL to compile-time convert string literals into StringRefs, this will reduce the number of allocation and remove most of the strcpy calls inherent in converting string lits into `std::string`s. 17 November 2023, 08:54:03 UTC
de7ba4e fn need to be in parenthesis Otherwise intel c++ 19.1 cause an error "expression preceding parentheses of apparent call must have (pointer-to-) function type CATCH2" 16 November 2023, 11:33:35 UTC
733b901 Fix special character escaping in JsonWriter 14 November 2023, 22:35:22 UTC
7bf136b Add JSON reporter (#2706) Co-authored-by: Martin Hořeňovský <martin.horenovsky@gmail.com> 14 November 2023, 21:52:15 UTC
2c68a0d lifted suggested version Did this, because with 3.0.1, the files - catch_xmlwriter.cpp - catch_string_manip.hpp - catch_test_case_info.hpp were missing This led to some obvious and some obscure compile errors when compiling with g++ 13.2.0 (std c++17 or c++20) One of these errors being "Elaborated-type-specifier for a scoped enum must not use the ‘class’ keyword" Since this is a rather bad experience and debugging it is time-consuming, I suggest to simply boost the recommended version in the snippet which is likely copied by new Catch2 users 14 November 2023, 16:10:31 UTC
01cac90 Bump up actions/checkout version to v4 (#2760) 09 November 2023, 09:31:49 UTC
b735dfc Increase build parallelism on macOS (#2759) Co-authored-by: Martin Hořeňovský <martin.horenovsky@gmail.com> 07 November 2023, 21:17:47 UTC
caffe79 Fix missing include in catch_message.hpp Because the issue comes from the expansions of `UNSCOPED_INFO`, surrogate TUs could not catch this bug, and in common usage, the include transitively comes from `catch_test_macros.hpp`. Fixes #2758 03 November 2023, 23:33:18 UTC
a8cf3e6 Mark `CATCH_CONFIG_` options as advanced These options are rather low-level and don't need to be seen in the CMake cache unless you opt into seeing all other advanced options. This removes a lot of cache entries from the screen when using a GUI or TUI to view the cache thus making it easier for users to focus on the cache variables they're more likely to change on a frequent basis. 31 October 2023, 23:27:46 UTC
79d39a1 Fix tests for C++23's multi-arg index operator Closes #2744 28 October 2023, 19:49:58 UTC
6ebc013 Fix UDL definitions for C++23 Technically, the declaration should not have a space between the quotes and the underscore, because `_foo` is a reserved identifier, but `""_foo` is not. In general it works, but newer Clang versions warn about this, because WG21 wants to deprecate and later remove this form completely. 28 October 2023, 19:35:03 UTC
966d361 Improve formatting of test specification docs The existing formatting created one-element lists separated by paragraphs, when it would make more sense to have the paragraphs that are providing more information about one of those list entries be part of the list entry itself. I think this makes the documentation easier to read in both markdown and html form, and should also improve the structure for assistive technologies. 24 October 2023, 14:01:56 UTC
766541d why-catch.md: Add JetBrains survey link 27 September 2023, 18:14:35 UTC
back to top