Releases: catchorg/Catch2
Releases · catchorg/Catch2
v3.5.3
Fixes
- Fixed OOB access when computing filename tag (from the
-#flag) for file without extension (#2798) - Fixed the linking against
logon Android to bePRIVATE(#2815) - Fixed
Wuseless-castin benchmarking internals (#2823)
Improvements
- Restored compatibility with VS2017 (#2792, #2822)
- The baseline for Catch2 is still C++14 with some reasonable workarounds for specific compilers, so if VS2017 starts acting up again, the support will be dropped again.
- Suppressed clang-tidy's
bugprone-chained-comparisonin assertions (#2801) - Improved the static analysis mode to evaluate arguments to
TEST_CASEandSECTION(#2817)- Clang-tidy should no longer warn about runtime arguments to these macros being unused in static analysis mode.
- Clang-tidy can warn on issues involved arguments to these macros.
- Added support for literal-zero detectors based on
constevalconstructors- This is required for compiling
REQUIRE((a <=> b) == 0)against MSVC's stdlib. - Sadly, MSVC still cannot compile this assertion as it does not implement C++20 correctly.
- You can use
clang-clwith MSVC's stdlib instead. - If for some godforsaken reasons you want to understand this better, read the two relevant commits:
dc51386b9fd61f99ea9c660d01867e6ad489b403, and0787132fc82a75e3fb255aa9484ca1dc1eff2a30.
- This is required for compiling
Miscellaneous
v3.5.2
v3.5.1
Improvements
- Significantly improved performance of the CLI parsing.
- This includes the cost of preparing the CLI parser, so Catch2's binaries start much faster.
Miscellaneous
v3.5.0
Improvements
- Introduced
CATCH_CONFIG_PREFIX_MESSAGESto prefix only logging macros (#2544)- This means
INFO,UNSCOPED_INFO,WARNandCAPTURE.
- This means
- Section hints in static analysis mode are now
const- This prevents Clang-Tidy from complaining about
misc-const-correctness.
- This prevents Clang-Tidy from complaining about
from_rangegenerator supports C arrays and ranges that require ADL (#2737)- Stringification support for
std::optionalnow also includesstd::nullopt(#2740) - The Console reporter flushes output after writing benchmark runtime estimate.
- This means that you can immediately see for how long the benchmark is expected to run.
- Added workaround to enable compilation with ICC 19.1 (#2551, #2766)
- Compiling Catch2 for XBox should work out of the box (#2772)
- Catch2 should automatically disable getenv when compiled for XBox.
- Compiling Catch2 with exceptions disabled no longer triggers
Wunused-function(#2726) randomGenerators for integral types are now reproducible across different platforms- Unlike
<random>, Catch2's generators also support 1 byte integral types (char,bool, ...)
- Unlike
randomGenerators forfloatanddoubleare now reproducible across different platformslong doublevaries across different platforms too much to be reproducible- This guarantee applies only to platforms with IEEE 754 floats.
Fixes
- UDL declaration inside Catch2 are now strictly conforming to the standard
operator "" _ais UB,operator ""_ais fine. Seriously.
- Fixed
CAPTUREtests failing to compile in C++23 mode (#2744) - Fixed missing include in
catch_message.hpp(#2758) - Fixed
CHECK_ELSEsuppressing failure from uncaught exceptions(#2723)
Miscellaneous
- The documentation for specifying which tests to run through commandline has been completely rewritten (#2738)
- Fixed installation when building Catch2 with meson (#2722, #2742)
- Fixed
catch_discover_testswhen using custom reporter andPRE_TESTdiscovery mode (#2747) catch_discover_testssupports multi-config CMake generator inPRE_TESTdiscovery mode (#2739, #2746)
v3.4.0
3.4.0
Improvements
VectorEqualssupports elements that provide only==and not!=(#2648)- Catch2 supports compiling with IAR compiler (#2651)
- Various small internal performance improvements
- Various small internal compilation time improvements
- XMLReporter now reports location info for INFO and WARN (#1251)
- This bumps up the xml format version to 3
- Documented that
SKIPin generator constructor can be used to handle empty generator (#1593) - Added experimental static analysis support to
TEST_CASEandSECTIONmacros (#2681)- The two macros are redefined in a way that helps the SA tools reason about the possible paths through a test case with sections.
- The support is controlled by the
CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORToption and autodetects clang-tidy and Coverity.
*_THROWS,*_THROWS_AS, etc now suppress warning coming from__attribute__((warn_unused_result))on GCC (#2691)- Unlike plain
[[nodiscard]], this warning is not silenced by void cast. WTF GCC?
- Unlike plain
Fixes
- Fixed
assertionStartingevents being sent after the expr is evaluated (#2678) - Errors in
TEST_CASEtags are now reported nicely (#2650)
Miscellaneous
v3.3.2
Improvements
- Further reduced allocations
- The compact, console, TAP and XML reporters perform less allocations in various cases
- Removed 1 allocation per entered
SECTION/TEST_CASE. - Removed 2 allocations per test case exit, if stdout/stderr is captured
- Improved performance
- Section tracking is 10%-25% faster than in v3.3.0
- Assertion handling is 5%-10% faster than in v3.3.0
- Test case registration is 1%-2% faster than in v3.3.0
- Tiny speedup for registering listeners
- Tiny speedup for
CAPTURE,TEST_CASE_METHOD,METHOD_AS_TEST_CASE, andTEMPLATE_LIST_TEST_*macros.
Contains,RangeEqualsandUnorderedRangeEqualsmatchers now support ranges with iterator + sentinel pair- Added
IsNaNmatcher- Unlike
REQUIRE(isnan(x)),REQUIRE_THAT(x, IsNaN())shows you the value ofx.
- Unlike
- Suppressed
declared_but_not_referencedwarning for NVHPC (#2637)
Fixes
- Fixed performance regression in section tracking introduced in v3.3.1
- Extreme cases would cause the tracking to run about 4x slower than in 3.3.0
v3.3.1
Improvements
- Reduced allocations and improved performance
- The exact improvements are dependent on your usage of Catch2.
- For example running Catch2's SelfTest binary performs 8k less allocations.
- The main improvement comes from smarter handling of
SECTIONs, especially siblingSECTIONs
v3.3.0
Improvements
- Added
MessageMatchesexception matcher (#2570) - Added
RangeEqualsandUnorderedRangeEqualsgeneric range matchers (#2377) - Added
SKIPmacro for skipping tests from within the test body (#2360)- All built-in reporters have been extended to handle it properly, whether your custom reporter needs changes depends on how it was written
skipTestreporter event is unrelated to this, and has been deprecated since it has practically no uses
- Restored support for PPC Macs in the break-into-debugger functionality (#2619)
- Made our warning suppression compatible with CUDA toolkit pre 11.5 (#2626)
- Cleaned out some static analysis complaints
Fixes
- Fixed macro redefinition warning when NVCC was reporting as MSVC (#2603)
- Fixed throws in generator constructor causing the whole binary to abort (#2615)
- Now it just fails the test
- Fixed missing transitive include with libstdc++13 (#2611)
Miscellaneous
v3.2.1
v3.2.0
3.2.0
Improvements
- Catch2 now compiles on PlayStation (#2562)
- Added
CATCH_CONFIG_GETENVcompile-time toggle (#2562)- This toggle guards whether Catch2 calls
std::getenvwhen reading env variables
- This toggle guards whether Catch2 calls
- Added support for more Bazel test environment variables
- Bunch of small tweaks and improvements in reporters
- Added support for asserting on types that can only be compared with literal 0 (#2555)
- A canonical example is C++20's
std::*_orderingtypes, which cannot be compared with anintvariable, only0 - The support extends to any type with this property, not just the ones in stdlib
- This change imposes 2-3% slowdown on compiling files that are heavy on
REQUIREand friends - This required significant rewrite of decomposition, there might be bugs
- A canonical example is C++20's
- Simplified internals of matcher related macros
- This provides about ~2% speed up compiling files that are heavy on
REQUIRE_THATand friends
- This provides about ~2% speed up compiling files that are heavy on
Fixes
- Cleaned out some warnings and static analysis issues
- Fixed serialization of test filters so the output roundtrips
- This means that e.g.
./tests/SelfTest "aaa bbb", [approx]outputsFilters: "aaa bbb",[approx]
- This means that e.g.
Miscellaneous
- Catch2's build no longer leaks
-ffile-prefix-mapsetting to dependees (#2533)