docs/release-notes.md
<a id="top"></a>
Contents
<cstdint> includes. (#3078)catch_discover_tests failing during PRE_TEST discovery if a target does not have discoverable tests. (#3075)CATCH_CONFIG_PREFIX_ALL defined. (#3087)--list-tags and --list-listeners has a quiet variant.__COUNTER__ usage. (#3076)--benchmark-samples 0 no longer hard crashes (#3056)
DEPRECATED to CATCH_DEPRECATED to avoid conflicts (#3058)UNSCOPED_CAPTURE macro (#2954)ConcatGenerator to combine multiple separate generator into one
catskipToNthElementImplisFinite() to return the proper value--warn InfiniteGenerators to error out on GENERATE being given an infinite generatorMapGenerator only calls the mapping function if the output will be used--order to mention random order as the default. (#3045)CATCH_CONFIG_THREAD_SAFE_ASSERTIONS for older C++ standards.lifetimebound attribute to various places.
std::tuple printer does not recurse.thread_local in thread-safe builds. (#3044)CATCH_CONFIG_THREAD_SAFE_ASSERTIONS.CAPTURE) is a bit faster.--invisibles mode.TEST_RANDOM_SEED env var (#3021)TEST_PREMATURE_EXIT_FILE env var (#3020)
--premature-exit-guard-fileDESTDIR env var into account when selecting install destination (#3006, #3019)filter to store the provided predicate by value (#3002, #3005)
filter is used inside GENERATE_COPY/GENERATE_REF.INFO, CAPTURE, WARN, SUCCEED, etc) are now thread safe.time_point with non-default duration type (#2685)CATCH_TRAP prefers __builtin_debugtrap on all platforms when Catch2 is compiled with ClangassertionEnded events on passing assertions.
REQUIRE(true) is 60% faster in Release and 80% faster in Debug build configurationREQUIRE_NOTHROW is 230% faster in Release and 430% faster in Debug build configurationREQUIRE_THROWS is ~3% faster in Release and 20% faster in Debug build configuration (throwing introduces enough overhead that the optimizations inside Catch2 are mostly irrelevant)assertionEnded events for passing assertions.FAIL and SKIP macros (#2941)
assertionStarting event when no reporter requires it
ReporterPreferences::shouldReportAllAssertionStarts--list-tags output (#2963)readability-static-accessed-through-instance in testscppcoreguidelines-avoid-non-const-global-variables (#2582)TEMPLATE_TEST_CASE_SIG can handle signatures consisting of only types (#2680, #2995)catch_test_run_info.hpp up from internal/ subfolder into the main one (#2972)std::initializer_list overloads for (Unordered)RangeEquals matcher (#2915, #2919)Wconversion (#2875)builtin_constant_p tricks in assertion macros configurable (#2925)
performance-enum-size warningsfrom_range generator with iterators with value_type = const T (#2926)
value_type typedef, but it is used in the wild and the change does not make the code meaningfully worse.catch_discover_tests CMake helper
CTEST_FILE param when creating the indirection file for PRE_TEST discovery mode (#2936)catch_discover_tests now requires CMake 3.19 or newerADD_TAGS_AS_LABELS option. If specified, each CTest test will be labeled with corresponding Catch2's test tag-Wuseless-cast in CHECK_THROWS_MATCHES (#2904)--allow-running-no-tests flag)- as an argument (#2905)catch_config_prefix_messages.hpp to meson build (#2903)catch_discover_tests now supports skipped tests (#2873)
catch_discover_tests with SKIP_IS_FAILURE option.TEST_CASE_PERSISTENT_FIXTURE (#2885, #1602)
TEST_CASE_METHOD, the same underlying instance is used for all partial runs of that test caseREQUIRE_THROWS_MATCHES)catch_discover_tests's handling of environment paths (#2878)
DL_PATHS or DYLD_FRAMEWORK_PATHS args_umul128 intrinsic.-Wnon-virtual-dtor in Decomposer and Matchers (#2854)precision in floating point stringmakers defaults to max_digits10.
compatibility_cppstr is set to False. (#2860)
Catch2::Catch2 (#2861)SelfTest target can be built through Bazel (#2857)std::(u)int*_t.
size_ts on MacOSWdelete-incomplete when compiling against libstdc++ in C++23 mode (#2852)std::foo_ordering would not compileCATCH_CONFIG_DEFAULT_REPORTER can now be an arbitrary reporter spec
DL_PATHS in catch_discover_tests now supports multiple arguments (#2852, #2736)Wunused when the reproducibility tests are disabled (#2845)-# flag) for file without extension (#2798)log on Android to be PRIVATE (#2815)Wuseless-cast in benchmarking internals (#2823)bugprone-chained-comparison in assertions (#2801)TEST_CASE and SECTION (#2817)
consteval constructors
REQUIRE((a <=> b) == 0) against MSVC's stdlib.clang-cl with MSVC's stdlib instead.dc51386b9fd61f99ea9c660d01867e6ad489b403, and 0787132fc82a75e3fb255aa9484ca1dc1eff2a30.-Wsubobject-linkage in the Console reporter (#2794)| (#2787)log library linking to the Meson build (#2784)CATCH_CONFIG_PREFIX_MESSAGES to prefix only logging macros (#2544)
INFO, UNSCOPED_INFO, WARN and CAPTURE.const
misc-const-correctness.from_range generator supports C arrays and ranges that require ADL (#2737)std::optional now also includes std::nullopt (#2740)Wunused-function (#2726)random Generators for integral types are now reproducible across different platforms
<random>, Catch2's generators also support 1 byte integral types (char, bool, ...)random Generators for float and double are now reproducible across different platforms
long double varies across different platforms too much to be reproducibleoperator "" _a is UB, operator ""_a is fine. Seriously.CAPTURE tests failing to compile in C++23 mode (#2744)catch_message.hpp (#2758)CHECK_ELSE suppressing failure from uncaught exceptions(#2723)catch_discover_tests when using custom reporter and PRE_TEST discovery mode (#2747)catch_discover_tests supports multi-config CMake generator in PRE_TEST discovery mode (#2739, #2746)VectorEquals supports elements that provide only == and not != (#2648)SKIP in generator constructor can be used to handle empty generator (#1593)TEST_CASE and SECTION macros (#2681)
CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT option and autodetects clang-tidy and Coverity.*_THROWS, *_THROWS_AS, etc now suppress warning coming from __attribute__((warn_unused_result)) on GCC (#2691)
[[nodiscard]], this warning is not silenced by void cast. WTF GCC?assertionStarting events being sent after the expr is evaluated (#2678)TEST_CASE tags are now reported nicely (#2650)catch_discover_tests
SECTION/TEST_CASE.CAPTURE, TEST_CASE_METHOD, METHOD_AS_TEST_CASE, and TEMPLATE_LIST_TEST_* macros.Contains, RangeEquals and UnorderedRangeEquals matchers now support ranges with iterator + sentinel pairIsNaN matcher
REQUIRE(isnan(x)), REQUIRE_THAT(x, IsNaN()) shows you the value of x.declared_but_not_referenced warning for NVHPC (#2637)SECTIONs, especially sibling SECTIONsMessageMatches exception matcher (#2570)RangeEquals and UnorderedRangeEquals generic range matchers (#2377)SKIP macro for skipping tests from within the test body (#2360)
skipTest reporter event is unrelated to this, and has been deprecated since it has practically no usesCATCH_CONFIG_GETENV compile-time toggle (#2562)
std::getenv when reading env variablesTESTBRIDGE_TEST_ONLY is now supported (#2490)TEST_SHARD_INDEX, TEST_TOTAL_SHARDS, TEST_SHARD_STATUS_FILE, are now all supported (#2491)std::*_ordering types, which cannot be compared with an int variable, only 0REQUIRE and friendsREQUIRE_THAT and friends-Wcomma warning rarely occurring in templated test cases (#2543)INFO (#2564)MatcherGenericBase copy constructor const (#2566)./tests/SelfTest "aaa bbb", [approx] outputs Filters: "aaa bbb",[approx]-ffile-prefix-map setting to dependees (#2533)Catch::getSeed function that user code can call to retrieve current rng-seed-ffile-prefix-map (#2517)SOVERSION set (#2516)catch2/catch_all.hpp convenience header no longer transitively includes windows.h (#2432, #2526)-Wuseless-cast warnings in REQUIRE_THROWS* macros (#2520, #2521)
voidnvc++ (#2533)DL_PATHS argument to catch_discover_tests on MacOS (#2483)*-avoid-c-arrays clang-tidy warning in TEMPLATE_TEST_CASE (#2095, #2536)-Wparentheses for older GCCs
_Pragmas in the C++ frontend.random generator (#2433)
std::uniform_int_distributionBAZEL_TEST environment variable (#2459)
CATCH_CONFIG_BAZEL_SUPPORT configuration option is also still supported.catch_discover_tests now has a new options for setting library load path(s) when running the Catch2 binary (#2467)catch_discover_tests, it supports very limited number of options and customizationCatch2 now uses statically compiled library as its distribution model. This also means that to get all of Catch2's functionality in a test file, you have to include multiple headers.
You probably want to look into the migration docs, which were written to help people coming from v2.x.x versions to the v3 releases.
catch_all.hpp header.catch.hpp with catch_all.hpp?
catch_all.hpp exists for two reasons. One of them is to provide a way for quick migration from Catch2, the second one is to provide a simple way to test things with Catch2. Using it for migration has one drawback in that it is big. This means that including it will cause significant compile time drag, and so using it to migrate should be a conscious decision by the user, not something they can just stumble into unknowingly.catch.hpp no longer worksANON_TEST_CASE has been removed, use TEST_CASE with no arguments instead (#1220)--list* commands no longer have non-zero return code (#1410)--list-test-names-only has been removed (#1190)
--list-tests instead--list* commands are now piped through the reporters
TEST_CASE description support has been removed
TEST_CASE("A", "[.foo]") would be included by asking for ~[bar].PredicateMatcher is no longer type erased.
PredicateMatcher's typeSectionInfo no longer contains section description as a member (#1319)
SECTION("ShortName", "Long and wordy description"), but the description is thrown awayconst char* or be implicitly convertible to it[!hide] tag has been removed.
[.] or [.foo] instead.REGISTER_TEST_CASE macro need to be followed by a semicolon
TEST_CASE and friends in any wayIStreamingReporter::IsMulti member function was removed
ListeningReporter is now finalUnorderedEquals vector matcher) are now finalfinalCatch namespaceCatch::Matchers namespaceCATCH_CONFIG_MAIN will no longer create main in that TU.
libCatch2Main.a, or the proper CMake/pkg-config targetcatch2/catch_session.hppCATCH_CONFIG_EXTERNAL_INTERFACES has been removed.
CATCH_CONFIG_IMPL has been removed.
TestEventListenerBase was renamed to EventListenerBaseEventListenerBase now directly derives from IStreamingReporter, instead of deriving from StreamingReporterBaseGENERATE decays its arguments (#2012, #2040)
str in auto str = GENERATE("aa", "bb", "cc"); is inferred to char const* rather than const char[2].--list-* flags write their output to file specified by the -o flag--list-tests, -l, has been removed.
--list-tags, -t, has been removed.
--colour option has been replaced with --colour-mode optionmatch (#1307, #1553, #1554, #1843)
match member functionIsEmpty, SizeIs which check that the range has specific propertiesContains, which checks whether a range contains a specific elementAllMatch, AnyMatch, NoneMatch range matchers, which apply matchers over a range of elementscatch_test_macros.hpp is 80% cheaper than including catch.hpp| task | debug build | release build |
|---|---|---|
Run 1M REQUIRE(true) | 1.10 ± 0.01 | 1.02 ± 0.06 |
| Run 100 tests, 3^3 sections, 1 REQUIRE each | 1.27 ± 0.01 | 1.04 ± 0.01 |
| Run 3k tests, no names, no tags | 1.29 ± 0.01 | 1.05 ± 0.01 |
| Run 3k tests, names, tags | 1.49 ± 0.01 | 1.22 ± 0.01 |
| Run 1 out of 3k tests no names, no tags | 1.68 ± 0.02 | 1.19 ± 0.22 |
| Run 1 out of 3k tests, names, tags | 1.79 ± 0.02 | 2.06 ± 0.23 |
gmtime_r, rather than gmtime when constructing a date string (#2008, #2165)--list-* flags write their output to file specified by the -o flag (#2061, #2163)Approx::operator() is now properly const--rng-seed now accepts string "random-device" to generate random seed using std::random_deviceSTATIC_CHECK macro, similar to STATIC_REQUIRE (#2318)
CHECK, and not like REQUIRE.UnmatchedTestSpec, to error on test specs with no matching tests-w, --warn warning flags can now be provided multiple times to enable multiple warningsuint64_t on all platforms, instead of using size_t type.-o, --out output destination specifiers recognize - as stdout
--out=- to avoid CLI error about missing option- as stdout-r, --reporter flag now also accepts optional output destination::.XML_OUTPUT_FILE env var (#2399)
--skip-benchmarks flag to run tests without any BENCHMARKs (#2392, #2408)--list-listenersINFO macro no longer contains superfluous semicolon (#1456)--list* family of command line flags now return 0 on success (#1410, #1146)random generators returning the same value over and over againCATCH_CONFIG_DISABLE_MATCHERS no longer exists.
CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER no longer exists.
StringMaker specializations for <chrono> are always providedCatch2 and Catch2WithMain.
Catch2 is the statically compiled implementation by itselfCatch2WithMain also links in the default maincatch2 is the statically compiled implementation by itselfcatch2-with-main also links in the default main--allow-running-no-tests overrides this behaviour.NoTests warning has been removed because it is fully subsumed by this change.CATCH_CONFIG_FOO) can be set through CMake options of the same name
CATCH_CONFIG_NO_FOO overrides,
-DCATCH_CONFIG_DEFAULT_REPORTER=compact changes default reporter to "compact"-DCATCH_CONFIG_NO_ANDROID_LOGWRITE=ON forces android logwrite to off-DCATCH_CONFIG_ANDROID_LOGWRITE=OFF does nothing (the define will not exist)<iterator> include in benchmarking. (#2231)!mayfail tagged tests are now marked as skipped in JUnit reporter output (#2116)catch_discover_tests should handle escaped semicolon (;) better (#2214, #2215)MINSIGSTKSZ was no longer usable in constexpr context.min and max macros are defined (#2159)
windows.h without NOMINMAX remains a really bad idea, don't do itTEST_CASEs that differ only in the last character should be properly shuffledParseAndAddCatchTests CMake integration (#2092)
catch_discover_tests instead, which uses runtime information about available tests.catch_discover_tests that would cause it to fail when used in specific project structures (#2119)-c option) (#2025)ParseAndAddCatchTests not finding TEST_CASEs without tags (#2055, #2056)ParseAndAddCatchTests supports CMP0110 policy for changing behaviour of add_test (#2057)
ParseAndAddCatchTestsstd::uncaught_exceptions support under non-msvc platforms (#2021)catch_discover_tests has been improved significantly (#2023, #2039)
WORKING_DIRECTORY setting is respectedParseAndAddCatchTests now supports TEMPLATE_TEST_CASE macros (#2031)ParseAndAddCatchTests handles CMake v3.18.0 correctly (#1984)std::byte (#1992)GENERATE can now follow a SECTION at the same level of nesting (#1938)
SECTION(s) before the GENERATE will not be run multiple times, the following ones will.-D/--min-duration command line flag (#1910)
-d/--duration.TAPReporter no longer skips successful assertions (#1983)GENERATE nested in a for loop no longer creates multiple generators (#1913)TEMPLATE_TEST_CASE_SIG for 6 or more arguments (#1954)GENERATE on a single linefno-except support for platforms that do not provide shims for exception-related std functions (#1950)
OverallResultsCases.clang-format file to the repo (#1182, #1920)is_range ADL found deleted function (#1929)CAPTURE if the expression contained non-ASCII characters (#1925)std::result_of is not used if std::invoke_result is available (#1934)status attribute for tests (#1899)hicpp-vararg warning (#1921)
cppcoreguidelines-pro-type-vararg alias of the warning^ (bitwise xor) to CHECK and REQUIRE--order rand) has been reworked significantly (#1908)
| and & (bitwise or and bitwise and) are now supported in CHECK and REQUIRE
boolcppcoreguidelines-pro-type-vararg in assertions (#1901)
std::uncaught_exceptions (#1911)REQUIRE( int != unsigned int ) will now issue mixed signedness comparison warning--wait-for-keypress now also accepts never as an option (#1866)--benchmark-warmup-time {ms}<random> include in benchmarking (#1831)<iterator> include in benchmarking (#1874)[!hide] as per documentation (#1847)std::nextafter has been improved (#1854)wmain no longer incorrectly looks for WIN32 macro (#1849)
google-build-using-namespace clang-tidy warning is suppressed (#1799)ObjectStorage now behaves properly in const contexts (#1820)GENERATE_COPY(a, b) now compiles properly (#1809, #1815)range generator now allows floating point numbers (#1776)[.foo] is now properly parsed as [.][foo] when used on the command line (#1798)steady_clock::period is not std::nano (#1794)INFINITY is double (#1782)min and max macros from windows.h (#1772)WithinULP matcher now uses scientific notation for stringification (#1760)-Wunused-templates (#1762)TEMPLATE_LIST_TEST_CASE now properly handles non-copyable and non-movable types (#1729)TT (#1722, #1723)REGISTER_ENUM will now fail at compilation time if the registered enum is too largestd::is_same_v in C++17 mode (#1757)__android_log_write instead of __android_log_printCATCH_CONFIG_ANDROID_LOGWRITEfrom_range(from, to) or from_range(container)std::nextafter (#1739)
nextafter{f,l,}CATCH_CONFIG_GLOBAL_NEXTAFTERApprox(inf) not to match non-infinite values
--benchmark-no-analysis is set is now much simpler (#1768)Messagestd::exceptionApprox, it considers both sides when determining the allowed marginNaN and INFINITY to match user expectationsWithinRel<random> to provide cross-platform repeatability of random resultsChunkGenerator can now be used with chunks of size 0 (#1671)-c argument (#1670, #1673)_WIN32 to detect Windows platform (#1676)TEMPLATE_LIST_TEST_CASE now support non-default constructible type lists (#1697)-w NoTests returning 0 even when no tests were matched (#1449, #1683, #1684)RepeatGenerator and FixedValuesGenerator now fail to compile when used with bool (#1692)
--benchmark-no-analysis if you are using benchmarking under RTXdocs/contributing.md has been updated to provide contributors guidance on how to add these to newly written documentation--order and --rng-seed command line optionsCATCH_CONFIG_CPP17_OPTIONAL and CATCH_CONFIG_CPP17_BYTE macros*_THROWS_MATCHES documentation a bitCMAKE_SIZEOF_VOID_P is in CMake cache (#1660)CatchAddTests now properly escapes [ and ] in test names (#1634, #1698)CatchAddTests adding tags as CTest labels (#1658)
LABELS caused trouble for users who set them manuallyLABELS if the test name has spacesCATCH_CONFIG_EXTERNAL_INTERFACES (or implementation)WithinULP matcher now shows the acceptable range (#1581)uint32_t, uint64_t, and size_t without compilation failingREGISTER_ENUM convenience macro for generating StringMaker specializations for enums
UNSCOPED_INFO macro now has a prefixed/disabled/prefixed+disabled versions (#1611)ParseAndAddCatchTests (#1559, #1601)
ParseAndAddCatchTests_TESTS property which summarizes found testsOptionalCatchTestLauncher variables is usedCMAKE_MINIMUM_REQUIRED_VERSIONCatchAddTests now adds test's tags to their CTest labels (#1600)GENERATE_COPY and GENERATE_REF macros that can use variables inside the generator expression
GENERATE macro still does not allow variablesmap generator helper now deduces the mapped return type (#1576)[.foo] is now parsed as [.][foo].TEMPLATE_PRODUCT_TEST_CASE now uses the resulting type in the name, instead of the serial number (#1544)random helperUNSCOPED_INFO (#415, #983, #1522)
INFO that lives until next assertion/end of the test case.std:: qualified (#1541)
-Wunreachable-code occurring with (old) ccache+cmake+clang combination (#1540)-Wdefaulted-function-deleted warning with Clang 8 (#1537)Catch:: (#1548)ParseAndAddCatchTests now properly escapes commas in the test nameCATCH_REQUIRE_THROWS's internals were unified with REQUIRE_THROWS (#1536)
-Wunused-value warning when used--list-* options (#1533, #1534)With this release the data generator feature is now fully supported.
TEMPLATE_PRODUCT_TEST_CASE (#1454, #1468)
&& and || inside assertions has been improved (#1273, #1480)StringMaker specialization for std::optional (#1510)-Wredundant-move on newer Clang (#1474)std::current_exception, std::rethrow_exception in no-exceptions mode (#1462)
<type_traits> include (#1494)XmlWriter (#1489)estimateClockResolution (#1490)RunContext (#1491)SourceLineInfo move ops are now marked noexceptCATCH_BREAK_INTO_DEBUGGER is now always a function-o flag and writes to the file as well (#1502)std::variant support for compilers other than Clang (#1511)ParseAndAddCatchTests has learned how to use DISABLED CTest property (#1452)ParseAndAddCatchTests now works when there is a whitespace before the test name (#1493)contributing.md has been updated to reflect the current test status (#1484)TEMPLATE_TEST_CASE (#1437)PredicateMatcher<const char*> by removing partial specialization of MatcherMethod<T*>Catch::isnan polyfill (#1438)CAPTURE asserting for non-trivial captures (#1436, #1448)E29C 46F3 B8A7 5028 6079 3B7D ECC9 C20E 314B 2360Catch::Session::applyCommandLine now also accepts wchar_t arguments.
STATIC_REQUIRE macro (#1356, #1362)-r is now reported sooner (#1351, #1422)char is signed (#1399, #1407)
Wtautological-compare warning.operator<< no longer sees different overload set than the actual insertion (#1403)catch_discover_tests correctly adds tests with comma in name (#1327, #1409)catch_discover_testsstd::(w)string_view (#1375, #1376)std::variant (#1380)
std::to_string (#1396, #1397)UnorderedEqualsMatcher will no longer accept erroneously accept
vectors that share suffix, but are not permutation of the desired vector-x N) can no longer be overshot by nested REQUIRES and
subsequently ignored (#1391, #1392)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.
CAPTURE macro is now variadicAND_GIVEN macro (#1360)-Wnon-virtual-dtor warnings in Matchers (#1357)-Wunreachable-code warnings in floating point matchers (#1350)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.
-Wunused-variable suppression no longer leaks from Catch's header under Clangdup or tmpfile.-s (#1264, #1267, #1310)
#include <catch2/catch.hpp>contrib/ReporterPreferences::shouldReportAllAssertions
false and the tests are run without -s, passing assertions are not sent to the reporter.false.DYNAMIC_SECTION, a section variant that constructs its name using stream
DYNAMIC_SECTION("For X := " << x).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.
TEST_CASE_METHOD can now be used on classnames containing commas (#1245)
std::to_string in C++11 mode (#1280)FALLBACK_STRINGIFIER in stringification machinery (#1024)
operator<< with templated lhs (#1285, #1306)printfCATCH_CONFIG_EXPERIMENTAL_REDIRECT in the implementation filestd::exception
StringMaker specialization and operator<< overload are given prioritycontrib/ now contains dbg scripts that skip over Catch's internals (#904, #1283)
gdbinit for gdb lldbinit for lldbCatchAddTests.cmake no longer strips whitespace from tests (#1265, #1281)--use-colour option (#1263)WithinAbs::match() failing spuriously (#1228)-Wparentheses should be leaking nowstd::chrono::high_resolution_clock's resolution is low, the calibration would appear stuckunsigned chars (#1238)T^) can now be stringified (#1216)
PredicateMatcher, a matcher that takes an arbitrary predicate function (#1236)
#include <catch.hpp>(#1239)
#include <catch2/catch.hpp> are still in effectstd=c++17 against libc++ (#1214)
std::optional without including it explicitlycatch_discover_tests CMake script work better<windows.h> could potentially not be included properly (#1197)Catch2ConfigVersion.cmake when Catch2 is a subproject.-w NoTestsCatch::Session::run() now accepts char const * const *, allowing it to accept array of string literals (#1031, #1178)
-fno-rtti (#1165)operator<< is used before range-based stringification (#1172)-Wpedantic warnings (extra semicolons and binary literals) (#1173)CATCH_VERSION_{MAJOR,MINOR,PATCH} macros (#1131)BrightYellow colour for use in reporters (#979)
NO_SELFTEST option is deprecated, use BUILD_TESTING instead.CATCH_ for namespacing purposesCATCH_CONFIG_EXTERNAL_INTERFACES now brings in declarations of Console, Compact, XML and JUnit reportersMatcherBase no longer has a pointless second template argumentg++ is used together with libc++ (#1110)WARN messages even when not used with -sVectorContains matcher was combined using && (#1092)std::uncaught_exception deprecation warning (#1124)Matches.UnorderedEqualsWithinAbs and WithinULP.begin(T) and end(T).single_include folder to ensure their compatibility with the last released versionCatch::toString support
Catch::StringMaker specializations first and operator<< overloads second.SCOPED_MSG and SCOPED_INFO macrosINTERNAL_CATCH_REGISTER_REPORTER
CATCH_REGISTER_REPORTER should be used to register reporters[hide] tag
[.], [.foo] and [!hide] are still supported*_THROWS_AS(expr, exception_type) now unconditionally appends const& to the exception type.CATCH_CONFIG_FAST_COMPILE now affects the CHECK_ family of assertions as well as REQUIRE_ family of assertions
CHECK(throws()), which would previously report failure, properly stringify the exception and continue. Now it will report failure and stop executing current section.Not, AllOf and AnyOf.
!, && and ||, which are natural and do not have limited aritystd::pair and std::tuple are no longer stringified by default
<tuple> and <utility> headers in common pathApprox is subtly different and hopefully behaves more as users would expect
Approx::scale defaults to 0.0Approx::epsilon no longer applies to the larger of the two compared values, but only to the Approx's valueINFINITY == Approx(INFINITY) returns trueCATCH_CONFIG_EXTERNAL_INTERFACES before including catch.hpp.REQUIRE(foo() == std::vector<int>{1, 2, 3});)projects/SelfTest/Benchmark.tests.cpp for examplesCatch::Session interfaceCATCH_CONFIG_DISABLE_MATCHERS
CATCH_CONFIG_DISABLE has been added
DOCTEST_CONFIG_DISABLETEST_CASE registrationsstd::chrono::duration and std::chrono::time_point is now supported
pkg-config support to CMake install command-Wweak-vtables, -Wexit-time-destructors, -Wglobal-constructors warningsstd::uncaught_exception issues in libcxxrt
throw; to rethrow an exceptionScopedMessage::~ScopedMessagemin or max identifiers are now wrapped in parentheses
min and max macrosINFO messages are included in the xml reporter output even without -s specified.REQUIRE_FALSE( expr ) is now reporter properly as !( expr ) (#1051)
x != y would be expanded as !x != xApprox::Margin is now inclusive (#952)
REQUIRE( 0.25f == Approx( 0.0f ).margin( 0.25f ) ) passes, instead of failsRandomNumberGenerator::result_type is now unsigned (#1050)__JETBRAINS_IDE__ macro handling is now CLion version specific (#1017)
__COUNTER__ is used instead ofParseAndAddCatchTests now can add test files as dependency to CMake configuration
[!shouldfail] and [!mayfail] tags and sections
--list-extra-info cli option (#934).
catch.hpp, but do not define CATCH_CONFIG_MAIN or CATCH_CONFIG_RUNNER) (#871)__COUNTER__ (#928)
__COUNTER__.std::uncaught_exception as deprecated. (#927)CATCH_FAIL macro no longer causes compilation error without variadic macro supportINFO messages are no longer cleared after being reported oncewmain when compiled under Windows and UNICODE is defined.
Approx's member functions now accept strong typedefs in C++11 mode (#888)
Approx::scale, Approx::epsilon, Approx::margin and Approx::operator() didn't.Catch::Option should now have its storage properly aligned.uint64_t on windows (#862)
std:c++latest (C++17 mode) in CIcontrib folder.REQUIRE_THROWS_AS is a constant reference.
REQUIRE_THROWS_AS was used inside templated functionsVersion struct should no longer be double freed when multiple instances of Catch tests are loaded into single program (#858)
externed struct.exit().
CATCH_CONFIG_FAST_COMPILE now speeds-up compilation of REQUIRE* assertions by further ~15%.
Approx is now constructible with anything that can be explicitly converted to double.-Wexit-time-destructors should be suppressed for Catch's internals-Wparentheses is now suppressed for all TU's that include catch.hpp.
_Pragma based suppression. This should have kept the suppression local to Catch's assertions, but bugs in GCC's handling of _Pragmas in C++ mode meant that it did not always work.-s was always set
-d yes argument (#780)
INFO
INFO messages on success, if output on success (-s) is enabled.INFO messages on failure.CAPTURE(expr) now stringifies expr in the same way assertion macros do (#639)std::strings are now taken by const& everywhere (#842).
FAIL_CHECK( ... ) macro (#765).
FAIL( ... ), but does not abort the test.fabs, tolower, memset, isalnum are now used with std:: qualification (#543).Cygwin issue with gettimeofday - #define was not early enough
Some simple comparisons between doubles completed in 0.000123sxxx.123s: Some simple comparisons between doubles (There will always be exactly 3 decimal places)CATCH_CONFIG_WINDOWS_CRTDBGCATCH_CONFIG_FAST_COMPILE, trading features for compilation speed.
Section and TestCase tags.Approx now supports an optional margin of absolute error
gettimeofday inside Catch should no longer cause compilation errors.-Wparentheses suppression for gcc (#674)
Xml:
(technically the first two are breaking changes but are also fixes and arguably break few if any people)
Other:
REQUIRE_THROWS_AS now catches exception by const& and reports expected typeSECTIONs the file/ line is now of the SECTION. not the TEST_CASEdynamic_cast) that had crept back inNOMINMAX and WIN32_LEAN_AND_MEAN inside catch.hpp.char c = ' '; REQUIRE(c == '\t'); would be printed as ' ' == '\t', instead of == 9.-Wunused-value on expressions containing explicit cast.DEBUG to be defined.CHECK_THAT macro is now properly defined as CATCH_CHECK_THAT when using CATCH_ prefixed macros&& operator are no longer evaluated twice when used in an assertion macro.__COUNTER__ is suppressed when Catch is parsed by CLion
include folder but not is not enumerated as part of the projectNOMINMAX and WIN32_LEAN_AND_MEAN before including windows.h
>= and <=\ to escape chars in test names on command lineCATCH_CHECK_THROWSstd::shuffle on more compilers (fixes deprecation warning/error)__COUNTER__ more consistently (where available)Release notes were not maintained prior to v1.6.0, but you should be able to work them out from the Git history