Releases: catchorg/Catch2
v2.5.0
Improvements
- Added support for templated tests via
TEMPLATE_TEST_CASE(#1437)
Fixes
- Fixed compilation of
PredicateMatcher<const char*>by removing partial specialization ofMatcherMethod<T*> - Listeners now implicitly support any verbosity (#1426)
- Fixed compilation with Embarcadero builder by introducing
Catch::isnanpolyfill (#1438) - Fixed
CAPTUREasserting for non-trivial captures (#1436, #1448)
Miscellaneous
- We should now be providing first party Conan support via https://bintray.com/catchorg/Catch2 (#1443)
- Added new section "deprecations and planned changes" to the documentation
- It contains summary of what is deprecated and might change with next major version
- From this release forward, the released headers should be pgp signed (#430)
- KeyID
E29C 46F3 B8A7 5028 6079 3B7D ECC9 C20E 314B 2360 - or https://codingnest.com/files/horenmar-publickey.asc
- KeyID
v2.4.2
Improvements
- XmlReporter now also outputs the RNG seed that was used in a run (#1404)
Catch::Session::applyCommandLinenow also acceptswchar_targuments.- However, Catch2 still does not support unicode.
- Added
STATIC_REQUIREmacro (#1356, #1362) - Catch2's singleton's are now cleaned up even if tests are run (#1411)
- This is mostly useful as a FP prevention for users who define their own main.
- Specifying an invalid reporter via
-ris now reported sooner (#1351, #1422)
Fixes
- Stringification no longer assumes that
charis signed (#1399, #1407)- This caused a
Wtautological-comparewarning.
- This caused a
- SFINAE for
operator<<no longer sees different overload set than the actual insertion (#1403)
Contrib
v2.4.1
v2.4.0
This release brings two new experimental features, generator support and a -fno-exceptions support. Being experimental means that they will not be subject to the usual stability guarantees provided by semver.
Improvements
- Various small runtime performance improvements
CAPTUREmacro is now variadic- Added
AND_GIVENmacro (#1360) - Added experimental support for data generators
- See their documentation for details
- Added support for compiling and running Catch without exceptions
- Doing so limits the functionality somewhat
- Look into the documentation for details
Fixes
- Suppressed
-Wnon-virtual-dtorwarnings in Matchers (#1357) - Suppressed
-Wunreachable-codewarnings in floating point matchers (#1350)
CMake
- It is now possible to override which Python is used to run Catch's tests (#1365)
- Catch now provides infrastructure for adding tests that check compile-time configuration
- Catch no longer tries to install itself when used as a subproject (#1373)
- Catch2ConfigVersion.cmake is now generated as arch-independent (#1368)
- This means that installing Catch from 32-bit machine and copying it to 64-bit one works (this is what e.g. conan does)
v2.3.0
This release changes the include paths provided by our CMake and pkg-config integration. The proper include path for the single-header when using one of the above is now <catch2/catch.hpp>. This change also necessitated changes to paths inside the repository, so that the single-header version is now at single_include/catch2/catch.hpp, rather than single_include/catch.hpp.
Fixes
- Fixed Objective-C++ build
-Wunused-variablesuppression no longer leaks from Catch's header under Clang- Implementation of the experimental new output capture can now be disabled (#1335)
- This allows building Catch2 on platforms that do not provide things like
duportmpfile.
- This allows building Catch2 on platforms that do not provide things like
- The JUnit and XML reporters will no longer skip over successful tests when running without
-s(#1264, #1267, #1310)- See improvements for more details
Improvements
- pkg-config and CMake integration has been rewritten
- If you use them, the new include path is
#include <catch2/catch.hpp> - CMake installation now also installs scripts from
contrib/ - For details see the new documentation
- If you use them, the new include path is
- Reporters now have a new customization point,
ReporterPreferences::shouldReportAllAssertions- When this is set to
falseand the tests are run without-s, passing assertions are not sent to the reporter. - Defaults to
false.
- When this is set to
- Added
DYNAMIC_SECTION, a section variant that constructs its name using stream- This means that you can do
DYNAMIC_SECTION("For X := " << x).
- This means that you can do
v2.2.3
To fix some of the bugs, some behavior had to change in potentially breaking manner.
This means that even though this is a patch release, it might not be a drop-in replacement.
Fixes
- Listeners are now called before reporter
- This was always documented to be the case, now it actually works that way
- Catch's commandline will no longer accept multiple reporters
- This was done because multiple reporters never worked properly and broke things in non-obvious ways
- This has potential to be a breaking change
- MinGW is now detected as Windows platform w/o SEH support (#1257)
- This means that Catch2 no longer tries to use POSIX signal handling when compiled with MinGW
- Fixed potential UB in parsing tags using non-ASCII characters (#1266)
- Note that Catch2 still supports only ASCII test names/tags/etc
TEST_CASE_METHODcan now be used on classnames containing commas (#1245)- You have to enclose the classname in extra set of parentheses
- Fixed insufficient alt stack size for POSIX signal handling (#1225)
- Fixed compilation error on Android due to missing
std::to_stringin C++11 mode (#1280) - Fixed the order of user-provided
FALLBACK_STRINGIFIERin stringification machinery (#1024)- It was intended to be replacement for built-in fallbacks, but it was used after them.
- This has potential to be a breaking change
- Fixed compilation error when a type has an
operator<<with templated lhs (#1285, #1306)
Improvements
- Added a new, experimental, output capture (#1243)
- This capture can also redirect output written via C apis, e.g.
printf - To opt-in, define
CATCH_CONFIG_EXPERIMENTAL_REDIRECTin the implementation file
- This capture can also redirect output written via C apis, e.g.
- Added a new fallback stringifier for classes derived from
std::exception- Both
StringMakerspecialization andoperator<<overload are given priority
- Both
Miscellaneous
v1.12.2
v2.2.2
Note: If you haven't, please read release notes of v2.2.0
Fixes
- Fixed bug in
WithinAbs::match()failing spuriously (#1228) - Fixed clang-tidy diagnostic about virtual call in destructor (#1226)
- Reduced the number of GCC warnings suppression leaking out of the header (#1090, #1091)
- Only
-Wparenthesesshould be leaking now
- Only
- Added upper bound on the time benchmark timer calibration is allowed to take (#1237)
- On platforms where
std::chrono::high_resolution_clock's resolution is low, the calibration would appear stuck
- On platforms where
- Fixed compilation error when stringifying static arrays of
unsigned chars (#1238)
Improvements
- XML encoder now hex-encodes invalid UTF-8 sequences (#1207)
- This affects xml and junit reporters
- Some invalid UTF-8 parts are left as is, e.g. surrogate pairs. This is because certain extensions of UTF-8 allow them, such as WTF-8.
- CLR objects (
T^) can now be stringified (#1216)- This affects code compiled as C++/CLI
- Added
PredicateMatcher, a matcher that takes an arbitrary predicate function (#1236)
Others
- Modified CMake-installed pkg-config to allow
#include <catch.hpp>(#1239)- The plans to standardize on
#include <catch2/catch.hpp>are still in effect
- The plans to standardize on
v2.2.1
Note: Please read release notes of v2.2.0
Fixes
v2.2.0
Important notice
There has been a long debate about the proper way of including the catch.hpp single include.
While we still think that the preferred way is to vendor the single include header, we have decided to use #include <catch2/catch.hpp> through our documentation and CMake scripts. To participate in the discussion, visit #1202 or our Discord.
This change has not yet taken place, but should happen during the next couple of minor releases.
Fixes
- Hidden tests are not listed by default when listing tests (#1175)
- This makes
catch_discover_testsCMake script work better
- This makes
- Fixed regression that meant
<windows.h>could potentially not be included properly (#1197) - Fixed installing
Catch2ConfigVersion.cmakewhen Catch2 is a subproject. (#1181)
Improvements
- Added an option to warn (+ exit with error) when no tests were ran (#1158)
- Use as
-w NoTests
- Use as
- Added provisional support for Emscripten (#1114)
- Added a way to override the fallback stringifier (#1024)
- This allows project's own stringification machinery to be easily reused for Catch
Catch::Session::run()now acceptschar const * const *, allowing it to accept array of string literals (#1031, #1178)- The embedded version of Clara was bumped to v1.1.3
- Various minor performance improvements
- Added support for DJGPP DOS crosscompiler (#1206)