GitHub

v3.15.3

Fixes

  • The JSON reporter's number handling is locale-independent. (#3176)
  • Removed leftover debug message from catch_discover_tests (#3177)
  • Fixed typo in the "Could not jump to the Nth element" exception message (#3181)

Improvements

  • catch_discover_tests registers tests in deterministic (alphabetical) order.
  • catch_discover_tests has been rewritten to be massively faster.
    • Preparing the actual CTest script is significantly faster.
    • Parsing the JSON test array is significantly faster.
    • Running without ADD_TAGS_AS_LABELS set is 10-15% faster (as opposed to being the same speed) (#3169)
    • The new implementation is about 4x-5x faster, so registering 500 tests now takes ~350ms (down from 1.1s).
  • JSON writing is faster
    • Small improvement in writing non-string values
    • ~6-40% improvement in writing string values that do not need escaping
    • ~1-6% improvement in writing string values that do need escaping
  • Better support for infs and NaNs in JSON output

v3.15.2

Fixes

  • Fixed --warn InfiniteGenerators triggering even if the generator was limited to specific element via path filtering.
  • Fixed -Wunused-parameter triggering in -fnoexceptions builds.

Improvements

  • catch_discover_tests can handle cases where the binary prints out non-Catch2 output due to global constructors (#3162)

v3.15.1

Fixes

  • Fixed potential OOB access when looking for start of broken UTF-8 sequence during linebreaking (#3096)
  • Fixed TEMPLATE_LIST_TEST_CASE_METHOD and CATCH_TEMPLATE_PRODUCT_TEST_CASE potentially causing ODR violations (#3161)

v3.15.0

Fixes

  • Fixed ambiguous overload issue with std::optional<T> in C++26. (#3095)
    • Since std::optional was turned into a range, the partial specialization of StringMaker for range-like types and for std::optional<T> were in conflict.

Improvements

  • Simplified CATCH_REGISTER_ENUM internals for faster compilation and retrieval.
  • Successful assertion are slightly (1-2%) faster.
  • Generic (new-style) matchers support constexpr matching in C++20.
    • Combining matchers requires C++26.
    • Catch2-provided generic matchers are all constexpr enabled.
  • Added STATIC_REQUIRE_THAT for compile-time matcher assertions.
    • This requires the compiler to support enough constexpr for matchers, see above.

v3.14.0

Fixes

  • Added missing <cstdint> includes. (#3078)
  • Fixed suppression of empty variadic macro arguments warning on Clang <19. (#3085)
  • Fixed catch_discover_tests failing during PRE_TEST discovery if a target does not have discoverable tests. (#3075)
  • Fixed build of the main library failing with CATCH_CONFIG_PREFIX_ALL defined. (#3087)
  • JUnit reporter outputs single failed (errored/skipped) assertion per test case. (#1919)

Improvements

  • The default implementation of --list-tags and --list-listeners has a quiet variant.
  • Suppressed the new Clang warning about __COUNTER__ usage. (#3076)
  • Line-wrapping counts utf-8 codepoints instead of bytes. (#1022, #3086)
    • Combining character sequences are still miscounted, but Catch2 does not aim to fully support Unicode.

v3.13.0

Fixes

  • --benchmark-samples 0 no longer hard crashes (#3056)
    • The CLI validation fails instead.
  • Fixed warning suppression macros being doubly defined when using Clang on Windows (#3060)

Improvements

  • Suppressed static analysis 26426 diagnostic for MSVC (#3057)
  • Renamed the internal deprecation macro from DEPRECATED to CATCH_DEPRECATED to avoid conflicts (#3058)
  • Added UNSCOPED_CAPTURE macro (#2954)
  • Added ConcatGenerator to combine multiple separate generator into one
    • The short form is cat
  • Generators can now jump forward to nth element efficiently
    • Custom generators that can jump forward efficiently should override skipToNthElementImpl
  • Generators can declare themselves infinite
    • The generator base defaults to declaring itself finite for backwards compatibility
    • Custom generators should override isFinite() to return the proper value
  • Added --warn InfiniteGenerators to error out on GENERATE being given an infinite generator
  • Extended options for section filtering from CLI to include generators
    • The user can specify which element from the generator to use in the test case
    • See documentation for how the new filters work and how they can be specified
  • MapGenerator only calls the mapping function if the output will be used

v3.12.0

Fixes

  • Fixed unscoped messages after a passing fast-pathed assertion being lost.
  • Fixed the help string for --order to mention random order as the default. (#3045)
  • Fixed small documentation typos. (#3039)
  • Fixed compilation with CATCH_CONFIG_THREAD_SAFE_ASSERTIONS for older C++ standards.
  • Fixed a thread-safety issue with message macros being used too early after the process starts.
  • Fixed automatic configuration to properly handle PlayStation platform. (#3054)
  • Fixed the weird behaviour of section filtering when specifying multiple filters. (#3038)
    • See #3038 for more details.

Improvements

  • Added lifetimebound attribute to various places.
    • As an example, compiler that supports lifetime analysis will now diagnose invalid use of Matcher combinators.
  • Minor compile-time improvements to stringification. (#3028)
    • std::tuple printer does not recurse.
    • Some implementation details were outlined into the cpp file.
  • Global variables will only be marked with thread_local in thread-safe builds. (#3044)

Miscellaneous

  • The thread safety support is no longer experimental.
    • The new CMake option and C++ define is now CATCH_CONFIG_THREAD_SAFE_ASSERTIONS.

v3.11.0

Fixes

  • Fixed building on non-desktop GDK platforms (#3029)
  • Fixed message macros being susceptible to race in specific scenario (#3031)
  • Catch2's SEH filter will call the previously installed filter after reporting the error (#3033)

Improvements

  • Handling of scoped messages (e.g. CAPTURE) is a bit faster.
  • Better out-of-the-box support for QNX (#2953)
  • Improved performance of assertions by up-to 10%
    • Release mode assertion fast-path sees the biggest improvement.
  • Faster processing of non-escaped strings in --invisibles mode.
  • Added support for Bazel's TEST_RANDOM_SEED env var (#3021)
  • Added support for Bazel's TEST_PREMATURE_EXIT_FILE env var (#3020)
    • This creates a file that is deleted if the tests exit normally, but stays around if the process dies unexpectedly.
    • This functionality is also exposed through CLI as --premature-exit-guard-file

Miscellaneous

v3.10.0

Fixes

  • pkg-config files will take DESTDIR env var into account when selecting install destination (#3006, #3019)
  • Changed filter to store the provided predicate by value (#3002, #3005)
    • This is done to avoid dangling-by-default behaviour when filter is used inside GENERATE_COPY/GENERATE_REF.

Improvements

  • Escaping XML and JSON output is faster when the strings do not need escaping.
    • The improvement starts at about 3x throughput, up to 10x for long strings.
  • Message macros (INFO, CAPTURE, WARN, SUCCEED, etc) are now thread safe.

v3.9.1

Fixes

  • Fixed bad error reporting for multiple nested assertions (#1292)
  • Fixed W4702 (unreachable code) in the polyfill for std::unreachable (#3007)
  • Fixed decomposition of assertions comparing enum-backed bitfields (#3001)
  • Fixed StringMaker specialization for time_point<system_clock> with non-default duration type (#2685)

Improvements

  • Exceptions thrown during stringification of decomposed expression no longer fail the assertion (#2980)
  • The selection logic for CATCH_TRAP prefers __builtin_debugtrap on all platforms when Catch2 is compiled with Clang

Read the original on github.com ↗