Skip to content

Releases: catchorg/Catch2

v2.2.3

06 Jun 21:20
Compare
Choose a tag to compare

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_METHOD can 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_string in C++11 mode (#1280)
  • Fixed the order of user-provided FALLBACK_STRINGIFIER in 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_REDIRECT in the implementation file
  • Added a new fallback stringifier for classes derived from std::exception
    • Both StringMaker specialization and operator<< overload are given priority

Miscellaneous

  • contrib/ now contains dbg scripts that skip over Catch's internals (#904, #1283)
    • gdbinit for gdb lldbinit for lldb
  • CatchAddTests.cmake no longer strips whitespace from tests (#1265, #1281)
  • Online documentation now describes --use-colour option (#1263)

v1.12.2

14 May 13:23
Compare
Choose a tag to compare

Fixes

  • Fixed missing include

v2.2.2

06 Apr 10:12
Compare
Choose a tag to compare

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 -Wparentheses should be leaking now
  • 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
  • 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

v2.2.1

11 Mar 11:05
Compare
Choose a tag to compare

Note: Please read release notes of v2.2.0

Fixes

  • Fixed compilation error when compiling Catch2 with std=c++17 against libc++ (#1214)
    • Clara (Catch2's CLI parsing library) used std::optional without including it explicitly
  • Fixed Catch2 return code always being 0 (#1215)
    • In the words of STL, "We feel superbad about letting this in"

v2.2.0

07 Mar 10:09
Compare
Choose a tag to compare

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_tests CMake script work better
  • Fixed regression that meant <windows.h> could potentially not be included properly (#1197)
  • Fixed installing Catch2ConfigVersion.cmake when Catch2 is a subproject. (#1181)

Improvements

  • Added an option to warn (+ exit with error) when no tests were ran (#1158)
    • Use as -w NoTests
  • 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 accepts char 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)

v1.12.1

02 Mar 21:23
Compare
Choose a tag to compare

Fixes

  • Fixed deprecation warning in ScopedMessage::~ScopedMessage
  • All uses of min or max identifiers are now wrapped in parentheses
    • This avoids problems when Windows headers define min and max macros

v2.1.2

09 Feb 16:11
Compare
Choose a tag to compare

Fixes

  • Fixed compilation error with -fno-rtti (#1165)
  • Fixed NoAssertion warnings
  • operator<< is used before range-based stringification (#1172)
  • Fixed -Wpedantic warnings (extra semicolons and binary literals) (#1173)

Improvements

  • Added CATCH_VERSION_{MAJOR,MINOR,PATCH} macros (#1131)
  • Added BrightYellow colour for use in reporters (#979)
    • It is also used by ConsoleReporter for reconstructed expressions

Other changes

  • Catch is now exported as a CMake package and linkable target (#1170)

v2.1.1

26 Jan 15:09
Compare
Choose a tag to compare

Improvements

  • Static arrays are now properly stringified like ranges across MSVC/GCC/Clang
  • Embedded newer version of Clara -- v1.1.1
    • This should fix some warnings dragged in from Clara
  • MSVC's CLR exceptions are supported

Fixes

  • Fixed compilation when comparison operators do not return bool (#1147)
  • Fixed CLR exceptions blowing up the executable during translation (#1138)

Other changes

  • Many CMake changes
    • NO_SELFTEST option is deprecated, use BUILD_TESTING instead.
    • Catch specific CMake options were prefixed with CATCH_ for namespacing purposes
    • Other changes to simplify Catch2's packaging

v1.12.0

12 Jan 08:59
Compare
Choose a tag to compare

Fixes

  • Fixed compilation for strict C++98 mode (ie not gnu++98) and older compilers (#1103)
  • INFO messages are included in the xml reporter output even without -s specified.

v2.1.0

10 Jan 12:58
Compare
Choose a tag to compare

Improvements

  • Various performance improvements
    • On top of the performance regression fixes
  • Experimental support for PCH was added (#1061)
  • CATCH_CONFIG_EXTERNAL_INTERFACES now brings in declarations of Console, Compact, XML and JUnit reporters
  • MatcherBase no longer has a pointless second template argument
  • Reduced the number of warning suppressions that leak into user's code
    • Bugs in g++ 4.x and 5.x mean that some of them have to be left in

Fixes

  • Fixed performance regression from Catch classic
    • One of the performance improvement patches for Catch classic was not applied to Catch2
  • Fixed platform detection for iOS (#1084)
  • Fixed compilation when g++ is used together with libc++ (#1110)
  • Fixed TeamCity reporter compilation with the single header version
    • To fix the underlying issue we will be versioning reporters in single_include folder per release
  • The XML reporter will now report WARN messages even when not used with -s
  • Fixed compilation when VectorContains matcher was combined using && (#1092)
  • Fixed test duration overflowing after 10 seconds (#1125, #1129)
  • Fixed std::uncaught_exception deprecation warning (#1124)

New features

  • New Matchers
    • Regex matcher for strings, Matches.
    • Set-equal matcher for vectors, UnorderedEquals
    • Floating point matchers, WithinAbs and WithinULP.
  • Stringification now attempts to decompose all containers (#606)
    • Containers are objects that respond to ADL begin(T) and end(T).

Other changes

  • Reporters will now be versioned in the single_include folder to ensure their compatibility with the last released version