v3.16.1
Changed 11
- Workaround GCC's quadratic scaling for release builds with a large number of test cases
- Decomposer operators are defined differently for better compilation times
- Decomposer handles stringification differently for smaller binary sizes
- Improved compilation costs of multiple assertions in one test case for release builds
- Initial test registration at process start uses fewer allocations for test cases with many tags
- Initial test registration at process start is faster for test cases with two or fewer tags
- Tag validation is faster during test registration
- Checking for duplicated test cases is faster during test registration
- Filtering tests by test name is optimized
- catch_discover_tests registers individual tests with --order decl for faster startup
- CMakeConfig:: family of tests use the main build's toolchain file
Fixed 3
- Optimizations are no longer disabled after including benchmarking headers under MSVC
- Console reporter no longer replaces \0xFF characters in user-provided strings
- Added missing <cassert> include to catch_generators_range.hpp
Deprecated 1
- Throwing exceptions from reporter interface functions is deprecated and must not be done
1 change to check, marked in the notes below
From Catch2
Fixes
- Fixed optimizations being disabled after including benchmarking headers under MSVC. (#3212)
- This was introduced in 3.16.0's fix for the deopt implementation for MSVC never being used.
- Fixed Console reporter replacing
\0xFFs in user-provided strings. - Added missing
<cassert>include tocatch_generators_range.hpp. (#3205)
Improvements
- Workaround for GCC's quadratic scaling for release builds with number of test cases.
- In practice the improvement is only noticeable with unity builds and/or template product tests.
- Changed how decomposer operators are defined for better compilation times.
- For Catch2's
SelfTestbinary, this provides ~2% build time improvement.
- For Catch2's
- Changed how decomposer handles stringification for smaller binary sizes.
- For the
SelfTestbinary this is about ~8%.
- For the
- Improved compilation costs of multiple assertions in one test cases for release builds.
- Optimized initial test registration at process start:
- Fewer allocations for test cases with many tags.
- Faster processing for test cases with <=2 tags.
- Faster tag validation.
- Faster checking for duplicated test cases.
- Optimized test selection and filtering:
- Optimized filtering tests by test name.
- Running
SelfTestwithabc*as the filter pattern is ~10% faster.
- Running
Miscellaneous
catch_discover_testsregisters individual tests with--order declfor faster startup.- For
SelfTest, this provides 20% improvement in Debug and 5% in Release builds.
- For
CMakeConfig::family of tests use the main build's toolchain file. (#3202)- Deprecated throwing exceptions from the reporter interface functions. deprecated · inferred
- Previously, throwing from e.g.
assertionEndedmight, or might not, have worked depending on which assertion has ended. As it is not practical for Catch2 to guard against the reporters failing randomly, and marking so withnoexceptcan provide compilation throughput improvements, I decided to fully forbid it. - Reporter constructors are allowed to throw and the test binary will report the error nicely before exiting.
- Due to C++ limitations, this deprecation cannot be marked inside the code, only in docs.
- Previously, throwing from e.g.