A modern, C++-native, header-only, test framework for unit-tests, TDD and BDD - using C++11, C++14, C++17 and later (or C++03 on the Catch1.x branch)

Overview

Catch2 logo

Github Releases Build Status Build Status Code Coverage Try online Join the chat in Discord: https://discord.gg/4CWS9zD

Catch2 v3 is being developed!

You are on the devel branch, where the next major version, v3, of Catch2 is being developed. As it is a significant rework, you will find that parts of this documentation are likely still stuck on v2.

For stable (and documentation-matching) version of Catch2, go to the v2.x branch.

For migrating from the v2 releases to v3, you should look at our documentation. It provides a simple guidelines on getting started, and collects most common migration problems.

What's the Catch2?

Catch2 is mainly a unit testing framework for C++, but it also provides basic micro-benchmarking features, and simple BDD macros.

Catch2's main advantage is that using it is both simple and natural. Tests autoregister themselves and do not have to be named with valid identifiers, assertions look like normal C++ code, and sections provide a nice way to share set-up and tear-down code in tests.

How to use it

This documentation comprises these three parts:

More

Issues
  • CATCH needs a more searchable name

    CATCH needs a more searchable name

    This is not the first time I run into this and I always just shrugged it off before, but after completely failing to find anything about the issue I was interested in (whether anybody has already done something to help with migrating the existing tests using CppUnit to CATCH) I have to say that this is a real problem: it's just impossible to find anything about CATCH using web search.

    It needs to use some unique name or at least not a word so prevalent when speaking about unit testing in C++ (because I'm not interested in finding about how to catch exceptions in CppUnit, damn it).

    It can be anything you like, I don't know if you prefer obvious but dull names (CppCatch, CatchUTF, ...), some other abbreviation (C++ Automated Tests Now Are Possible) or stupid puns (Notry, Dogch, ...) or hopefully something better I can't find, but it needs to be something you could enter into your search engine and actually find something related to CATCH.

    Discussion 
    opened by vadz 87
  • Never-ending loop wjhen the test case Failed

    Never-ending loop wjhen the test case Failed

    If I use this piece of code:

    #define CATCH_CONFIG_MAIN
    #include "catch.hpp"
    
    #include "TCACAVAUtilities.h"
    
    TEST_CASE( "TCACAVAUtilities::CreateColorFromRGB", "[CreateColorFromRGB]" ) {
        REQUIRE( TCACAVAUtilities::CreateColorFromRGB(0, 0, 0) == 255 );
    }
    

    The result is:

    C:\SourceCode\CVS_ROOT\CAVA\develop_clean\win_b64\code\bin>TCACAVACreateBaseCatalog.exe
    All tests passed (1 assertion in 1 test case)
    

    But If I use this code:

    #define CATCH_CONFIG_MAIN
    #include "catch.hpp"
    
    #include "TCACAVAUtilities.h"
    
    TEST_CASE( "TCACAVAUtilities::CreateColorFromRGB", "[CreateColorFromRGB]" ) {
        REQUIRE( TCACAVAUtilities::CreateColorFromRGB(1, 0, 0) == 255 );
        REQUIRE( TCACAVAUtilities::CreateColorFromRGB(0, 0, 0) == 255 );
    }
    

    The result is:

    -------------------------------------------------------------------------------
    TCACAVAUtilities::CreateColorFromRGB
    -------------------------------------------------------------------------------
    C:\SourceCode\CVS_ROOT\CAVA\develop_clean\TCACAVACatalog\TCACAVACreateBaseCatalo
    g.m\src\TCACAVACreateBaseCatalog.cpp(6)
    ...............................................................................
    
    C:\SourceCode\CVS_ROOT\CAVA\develop_clean\TCACAVACatalog\TCACAVACreateBaseCatalo
    g.m\src\TCACAVACreateBaseCatalog.cpp(7): FAILED:
      REQUIRE( TCACAVAUtilities::CreateColorFromRGB(1, 0, 0) == 255 )
    with expansion:
      0x10000ff == 255
    
    -------------------------------------------------------------------------------
    TCACAVAUtilities::CreateColorFromRGB
    -------------------------------------------------------------------------------
    C:\SourceCode\CVS_ROOT\CAVA\develop_clean\TCACAVACatalog\TCACAVACreateBaseCatalo
    g.m\src\TCACAVACreateBaseCatalog.cpp(6)
    ...............................................................................
    
    C:\SourceCode\CVS_ROOT\CAVA\develop_clean\TCACAVACatalog\TCACAVACreateBaseCatalo
    g.m\src\TCACAVACreateBaseCatalog.cpp(7): FAILED:
      REQUIRE( TCACAVAUtilities::CreateColorFromRGB(1, 0, 0) == 255 )
    with expansion:
      0x10000ff == 255
    
    -------------------------------------------------------------------------------
    TCACAVAUtilities::CreateColorFromRGB
    -------------------------------------------------------------------------------
    C:\SourceCode\CVS_ROOT\CAVA\develop_clean\TCACAVACatalog\TCACAVACreateBaseCatalo
    g.m\src\TCACAVACreateBaseCatalog.cpp(6)
    ...............................................................................
    
    C:\SourceCode\CVS_ROOT\CAVA\develop_clean\TCACAVACatalog\TCACAVACreateBaseCatalo
    g.m\src\TCACAVACreateBaseCatalog.cpp(7): FAILED:
      REQUIRE( TCACAVAUtilities::CreateColorFromRGB(1, 0, 0) == 255 )
    with expansion:
      0x10000ff == 255
    
    -------------------------------------------------------------------------------
    TCACAVAUtilities::CreateColorFromRGB
    -------------------------------------------------------------------------------
    C:\SourceCode\CVS_ROOT\CAVA\develop_clean\TCACAVACatalog\TCACAVACreateBaseCatalo
    g.m\src\TCACAVACreateBaseCatalog.cpp(6)
    ...............................................................................
    
    C:\SourceCode\CVS_ROOT\CAVA\develop_clean\TCACAVACatalog\TCACAVACreateBaseCatalo
    g.m\src\TCACAVACreateBaseCatalog.cpp(7): FAILED:
      REQUIRE( TCACAVAUtilities::CreateColorFromRGB(1, 0, 0) == 255 )
    with expansion:
      0x10000ff == 255
    
    -------------------------------------------------------------------------------
    TCACAVAUtilities::CreateColorFromRGB
    -------------------------------------------------------------------------------
    C:\SourceCode\CVS_ROOT\CAVA\develop_clean\TCACAVACatalog\TCACAVACreateBaseCatalo
    g.m\src\TCACforrtl: error (200): program aborting due to control-C event
    Image              PC                Routine            Line        Source
    
    libifcoremd.dll    00000000100BAB14  Unknown               Unknown  Unknown
    libifcoremd.dll    00000000100B46B9  Unknown               Unknown  Unknown
    libifcoremd.dll    00000000100A1017  Unknown               Unknown  Unknown
    libifcoremd.dll    0000000010021BF8  Unknown               Unknown  Unknown
    libifcoremd.dll    000000001002DDC8  Unknown               Unknown  Unknown
    kernel32.dll       00000000774F4803  Unknown               Unknown  Unknown
    kernel32.dll       00000000774B652D  Unknown               Unknown  Unknown
    ntdll.dll          00000000776EC541  Unknown               Unknown  Unknown
    

    The never-ending loop which should I stop with CTRL+C.

    Where is the problem ? Do I something wrong ?

    opened by dsamek 44
  • Xcode/XCTest Runner Integration

    Xcode/XCTest Runner Integration

    This patch adds support for XCTest integration by inverting the usual Catch behavior; rather than using Catch as the test runner, we dynamically register XCTestCase classes with the Objective-C runtime to allow Xcode's test runner to execute (and report on) Catch-defined test cases.

    To use this implementation, a project need only include "XCTestRunner.mm" in their unit test build -- the +[XCTestCaseCatchRegistry load] method will insert an XCTestRegistryHub instance that automatically registers XCTestCase classes for any Catch test cases defined within the image.

    +load methods by definition will run prior to C++ static initializers in the same image, ensuring that we insert our registry prior to any TestCase instances registering themselves.

    Currently, our granularity is limited to test cases -- we can't report on section execution without first registering the section as a test instance in the XCTestCase, and this would require static access to the list of sections/subsections defined within a TestCase or Section.

    This approach is based on the XCTest registration code I wrote for XSmallTest: https://github.com/landonf/XSmallTest

    opened by landonf 43
  • Add Catch::toString support for containers

    Add Catch::toString support for containers

    In order to enhance REQUIRE and CHECK error message when testing standard containers, add overloads of Catch::toString for:

    • std::pair
    • ~~std::deque~~
    • ~~std::list~~
    • ~~std::array (c++11)~~
    • ~~std::forward_list (c++11)~~
    • ~~(more types upcoming)~~
    • any type that has a container api (no need to add support for each container individually)

    Those types were printed as "{?}" (default toString implementation for unsupported class). This was contradictory with the documentation:

    "Most [...] std types are supported out of the box"

    when in fact only string, vector and tupple were supported.

    Detail:

    • Renamed the toStringVector.cpp test file to toStringContainers.cpp and type parametrized the vector tests to run them also for deque and list.
    • ~~The overhead of including all the standard container headers is negligable.~~ => No longer needed, types are treated as containers if they fulfill (some) of the container concept constraints.
    • Types are consider containers if they contain value_type and const_iterator members and have begin and end support (members or ADL findable) returning a const_iterator. const_iterator::operator* must also return a const value_type &
    • Beware that a trying to printing a type fulfilling those requirements but returning invalid iterators will results in undefined behaviour. In such case specialize the Catch::IsContainer trait to contain static const bool value = false in order revert to the default behaviour (printing "{?}").
    opened by mat-tso 36
  • #include <catch2/catch.hpp> vs #include

    #include vs #include "catch.hpp"

    Just wondering: It seems more ideomatic to me to include the library name as part of the include name instead of just using the header file name alone. On the other hand, for a single header library there is of course not a big need/difference for it unless the header name is likely to clash with a different file name.

    So I was wondering whether your preference of

    #include "catch.hpp"
    

    over

    #include <catch2/catch.hpp>
    

    was deliberate or more like "for historic reasons" / "didn't care".

    Discussion 
    opened by MikeGitb 32
  • Tests sorted according to random index instead of random hash

    Tests sorted according to random index instead of random hash

    Description

    Use a random number instead of a hash to sort the tests.

    Motivation

    In v2.x, test cases with names differing only in the last character are almost always run one after the other. For example, for 4 tests called "a1", "a2", "b1" and "b2", only 8 combinations out of the possible 24 were observed in 1000 runs with different seeds.

    Tweak request 
    opened by loximann 27
  • memory leaks detected by MSVCRT debugging facilities

    memory leaks detected by MSVCRT debugging facilities

    Extra information

    Environment: Windows 10 Compiler: Microsoft (R) Compiler Version 19.11.25547 for x64 (VS2017 15.4.4) Compiler options: -sdl -guard:cf -Zc:inline -Zc:rvalueCast -Zc:referenceBinding -Zc:strictStrings -std:c++latest Version of Catch: Current master git source

    Description

    I've just started with Catch and I created a test project following code as described in the Catch2/docs/tutorial.md. I added the #define CATCH_CONFIG_RUNNER and implemented my own wmain, basically a copy of the default. I also added the _CrtDumpMemoryLeaks() diagnostics in the end of wmain. I get the following output:

    Detected memory leaks!
    Dumping objects ->
    {223} normal block at 0x0000013DA7B8EC30, 16 bytes long.
     Data: < ZQ             > B8 5A 51 F6 F7 7F 00 00 00 00 00 00 00 00 00 00 
    Object dump complete.
    

    Is it possible this could be a false indication of memory allocated by Catch waiting to be released at program exit? If so, is it by design?

    Steps to reproduce

    Compile the source file catch_tutorial.cpp.txt

    Possible bug 
    opened by BeErikk 27
  • Build error in Visual Studio 2013

    Build error in Visual Studio 2013

    I tried to compile the following program using the single-header of the master branch.

    #define CATCH_CONFIG_MAIN
    #include "catch.hpp"
    

    In Visual Studio 2013 Preview, the first error is:

    catch.hpp(1980): error C2694: 'Catch::StreamBufBase::~StreamBufBase(void)': overriding virtual function has less restrictive exception specification than base class virtual member function 'std::basic_streambuf<char,std::char_traits<char>>::~basic_streambuf(void) throw()'
    1>          H:\petter\catch\single_include\catch.hpp(1980) : see declaration of 'Catch::StreamBufBase::~StreamBufBase'
    1>          C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\streambuf(78) : see declaration of 'std::basic_streambuf<char,std::char_traits<char>>::~basic_streambuf'
    
    opened by PetterS 27
  • testing getting skipped

    testing getting skipped

    It seems when sections are nested within an iteration, only the first iteration gets run. I do this kind of testing a lot and it would be nice if you could have sections within iterations.

    Ideally I would like to be able to do all the permutations of three or four variables, which is currently not possible. At the moment I find myself repeating code quite a lot with testing, and I'd like to have some more functional tests.

    TEST_CASE( (char*)"Cyclohexane", (char*)"[cyclohexane],[validation]" ) 
        {
            Fluid *CHEX = get_fluid(get_Fluid_index("Cyclohexane"));
            double mm = CHEX->params.molemass;
            validator_element data[] = {
                validator_element("T",300.0,"D",9.4*mm,"P",24.173705*1e6),
                validator_element("T",300.0,"D",9.4*mm,"O",115.28612/mm),
                validator_element("T",300.0,"D",9.4*mm,"C",154.76968/mm),
                validator_element("T",300.0,"D",9.4*mm,"A",1383.3876),
                validator_element("T",500.0,"D",6.5*mm,"P",3.9246630*1e6),
                validator_element("T",500.0,"D",6.5*mm,"O",192.52079/mm),
                validator_element("T",500.0,"D",6.5*mm,"C",255.57110/mm),
                validator_element("T",500.0,"D",6.5*mm,"A",434.13058),
                validator_element("T",500.0,"D",0.7*mm,"P",1.9981172*1e6),
                validator_element("T",500.0,"D",0.7*mm,"O",191.96468/mm),
                validator_element("T",500.0,"D",0.7*mm,"C",235.52304/mm),
                validator_element("T",500.0,"D",0.7*mm,"A",155.34798),
                validator_element("T",600.0,"D",3.5*mm,"P",6.8225506*1e6),  
                validator_element("T",600.0,"D",3.5*mm,"O",232.79249/mm),
                validator_element("T",600.0,"D",3.5*mm,"C",388.55212/mm),
                validator_element("T",600.0,"D",3.5*mm,"A",150.53314),
                validator_element("T",553.6,"D",3.3*mm,"P",4.0805433*1e6),
                validator_element("T",553.6,"D",3.3*mm,"O",224.19580/mm), 
                validator_element("T",553.6,"D",3.3*mm,"C",199224.62/mm), 
                validator_element("T",553.6,"D",3.3*mm,"A",87.913862)
            };
    
            //Now actually construct the vector
            std::vector<validator_element> elements(data, data + sizeof(data) / sizeof(validator_element));     
    
            for (std::vector<validator_element>::iterator it = elements.begin(); it != elements.end(); it++)
            {
                validator_element &el = *it;
                SECTION((char*)"validate")
                {
                    double eos = PropsSI((char*)el.in5.c_str(), (char*)el.in1.c_str(), el.in2, (char*)el.in3.c_str(), el.in4, "Cyclohexane")+1000;
                    double valid = el.in6;
                    CHECK(valid == eos);
                }
            }
        }
    
    opened by ibell 26
  • support for multi-threaded test-cases?

    support for multi-threaded test-cases?

    Hey Phil,

    do you have plans for supporting test-cases which internally spawn several threads to check correct behavior under multi-threaded conditions? This is not about executing several test cases in parallel.

    At least the Junit reporter does not support that very well and crashes; the Console reporter doesn't seem to have that issue for the same tests (at the moment) but the absence of any sync'ing mechanisms let me worry about that this could change anytime soon...

    For me it was enough to create a ThreadSafeJunitReporter by deriving from JunitReporter and adding a mutex/lock to the method assertionEnded() just like this:

    class ThreadSafeJunitReporter : public Catch::JunitReporter {
    public:
        ThreadSafeJunitReporter(Catch::ReporterConfig const& _config) :
            Catch::JunitReporter(_config) { }
    
        static std::string getDescription() {
            return "Reports test results in an XML format that looks like Ant's junitreport target.\n"
                "\tThis reporter can be used in a multi-threaded environment";
        }
    
        virtual bool assertionEnded(Catch::AssertionStats const& assertionStats) override {
            std::lock_guard<std::mutex> lock(m_mutex);
            return Catch::JunitReporter::assertionEnded(assertionStats);
        }
    
    private:
        std::mutex m_mutex;
    };
    
    INTERNAL_CATCH_REGISTER_REPORTER("junit-thread-safe", ThreadSafeJunitReporter);
    

    And using the command line option -r junit-thread-safe to get stable test runs again.


    BTW: could you change this impl:

            void ReporterRegistry::registerReporter( std::string const& name, IReporterFactory* factory ) {
                m_factories.insert( std::make_pair( name, factory ) );
            }
    

    into this one:

            void ReporterRegistry::registerReporter( std::string const& name, IReporterFactory* factory ) {
                m_factories[name] = factory;
            }
    

    This would allow someone to replace an existing reporter with an own implementation. The insert() call above just inserts the given factory iff there is no factory with name registered yet. The operator[] call will insert or update m_factories in any case.

    Revisit 
    opened by Kosta-Github 26
  • Logging macros scoped to test case instead of current scope

    Logging macros scoped to test case instead of current scope

    So I'm familiar with the INFO macro for logging. However, these logs get lost once the enclosing scope ends. I'd instead like logs to be scoped to a TEST_CASE or SECTION. I have a logging system (basically a singleton) that I can register logging sinks to. For only catch tests, I override the logger to sink all logs to INFO. My hope was, that for failed test cases, it would dump logs that occurred within its own test case across our whole code base (since they all use this logger). But this doesn't work since it's nested so deep, outside of actual test case scope (but still inside; just not explicitly).

    Is there some way I can make all logs in the code base funnel into Catch? Maybe an INFO_WITHIN_TESTCASE macro could be added or something? It would basically keep a list of all logs created, until the test case or section ends and then it is erased.

    ideas?

    Feature Request 
    opened by rcdailey 24
  • Build option BUILD_SHARED_LIBRARIES is not documented

    Build option BUILD_SHARED_LIBRARIES is not documented

    catch version 3 can build shared libraries, but this is not documented in configuration.md. There are some comments on cmake about what you normally wouldn't want to do this (on windows), but for some it is the best choice and they won't always look in the cmake files to see hidden options.

    opened by HenryMiller1 0
  • `catch_discover_tests` pass `<target>_TESTS` variable to `PARENT_SCOPE`

    `catch_discover_tests` pass `_TESTS` variable to `PARENT_SCOPE`

    Description

    The following documentation is for the TEST_LIST option for catch_discover_tests from cmake-integration.md#customization (italics added):

    Make the list of tests available in the variable var, rather than the default <target>_TESTS. This can be useful when the same test executable is being used in multiple calls to catch_discover_tests(). Note that this variable is only available in CTest.

    I would like to be able to use this variable in CMake to register "dependencies" between tests. See this article by Craig Scott for more information

    Additional context

    The motivation for my usage of CMake's test fixture mechanism as described in Craig's article is that I have a library that has layers of abstraction that build upon each other, where tests for the the higher level abstractions are expensive to run, while the lower levels are comparatively much cheaper to run, so I want to test the lower layers first and short-circuit the rest of the higher layer tests if they fail. There are other good reasons to use CMake's test fixture feature. Mine is only one of them.

    opened by david-fong 0
  • Add DISCOVERY_MODE to catch_discover_tests

    Add DISCOVERY_MODE to catch_discover_tests

    catch_discover_tests is modelled after CMake's gtest_discover_tests, but it's not up to date. Since CMake 3.18 gtest_discover_tests has supported a DISCOVERY_MODE option, which when set to PRE_TEST allows for the test discovery to be delayed until just prior to test execution. This is useful when cross-compiling, since the build machine may be unable to run the test executable. Adding DISCOVERY_MODE to catch_discover_tests would be equally useful.

    opened by reddwarf69 0
  • Permit compiling on Win32 using Clang

    Permit compiling on Win32 using Clang

    I am using clang version 14.0.6 on Windows. The compiler options file-prefix-map is invalid for this platform.

    If you could just surround the following function with if(NOT WIN32) ... endif(), it would be fantastic.

    https://github.com/catchorg/Catch2/blob/997a7d4165b3939347f1a95f9311a3e3c066ee0b/CMake/CatchMiscFunctions.cmake#L112-L120

    opened by mdavis199 0
  • Bazel support: TEST_TOTAL_SHARDS / TEST_SHARD_INDEX / TEST_SHARD_STATUS_FILE

    Bazel support: TEST_TOTAL_SHARDS / TEST_SHARD_INDEX / TEST_SHARD_STATUS_FILE

    Description Similarly to how Catch2 reads the BAZEL_TEST and XML_OUTPUT_FILE environment variables to support JUnit XML for Bazel, it should configure sharding based on the TEST_TOTAL_SHARDS and TEST_SHARD_INDEX environment variables, and indicate support for sharding by touching the file named in the TEST_SHARD_STATUS_FILE environment variable.

    https://bazel.build/reference/test-encyclopedia#test-sharding

    Feature Request Good First Issue 
    opened by jfirebaugh 0
  • Bazel support: read test specs from TESTBRIDGE_TEST_ONLY

    Bazel support: read test specs from TESTBRIDGE_TEST_ONLY

    Description Similarly to how Catch2 reads the BAZEL_TEST and XML_OUTPUT_FILE environment variables to support JUnit XML for Bazel, it should read test specs from the TESTBRIDGE_TEST_ONLY environment variable, which will be set when running bazel test with a --test_filter argument.

    Feature Request Good First Issue 
    opened by jfirebaugh 1
Releases(v3.1.0)
  • v3.1.0(Jul 17, 2022)

    Improvements

    • Improved suppression of -Wparentheses for older GCCs
      • Turns out that even GCC 9 does not properly handle _Pragmas in the C++ frontend.
    • Added type constraints onto random generator (#2433)
      • These constraints copy what the standard says for the underlying std::uniform_int_distribution
    • Suppressed -Wunused-variable from nvcc (#2306, #2427)
    • Suppressed -Wunused-variable from MinGW (#2132)
    • Added All/Any/NoneTrue range matchers (#2319)
      • These check that all/any/none of boolean values in a range are true.
    • The JUnit reporter now normalizes classnames from C++ namespaces to Java-like namespaces (#2468)
      • This provides better support for other JUnit based tools.
    • The Bazel support now understands BAZEL_TEST environment variable (#2459)
      • The CATCH_CONFIG_BAZEL_SUPPORT configuration option is also still supported.
    • Returned support for compiling Catch2 with GCC 5 (#2448)
      • This required removing inherited constructors from Catch2's internals.
      • I recommend updating to a newer GCC anyway.
    • catch_discover_tests now has a new options for setting library load path(s) when running the Catch2 binary (#2467)

    Fixes

    • Fixed crash when listing listeners without any registered listeners (#2442)
    • Fixed nvcc compilation error in constructor benchmarking helper (#2477)
    • Catch2's CMakeList supports pre-3.12 CMake again (#2428)
      • The gain from requiring CMake 3.12 was very minor, but y'all should really update to newer CMake

    Miscellaneous

    • Fixed SelfTest build on MinGW (#2447)
    • The in-repo conan recipe exports the CMake helper (#2460)
    • Added experimental CMake script to showcase using test case sharding together with CTest
      • Compared to catch_discover_tests, it supports very limited number of options and customization
    • Added documentation page on best practices when running Catch2 tests
    • Catch2 can be built as a dynamic library (#2397, #2398)
      • Note that Catch2 does not have visibility annotations, and you are responsible for ensuring correct visibility built into the resulting library.
    Source code(tar.gz)
    Source code(zip)
    catch_amalgamated.cpp(356.10 KB)
    catch_amalgamated.cpp.asc(833 bytes)
    catch_amalgamated.hpp(440.09 KB)
    catch_amalgamated.hpp.asc(833 bytes)
  • v3.0.1(May 17, 2022)

    Catch2 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.

    FAQ

    • Why is Catch2 moving to separate headers?
      • The short answer is future extensibility and scalability. The long answer is complex and can be found on my blog, but at the most basic level, it is that providing single-header distribution is at odds with providing variety of useful features. When Catch2 was distributed in a single header, adding a new Matcher would cause overhead for everyone, but was useful only to a subset of users. This meant that the barrier to entry for new Matchers/Generators/etc is high in single header model, but much smaller in the new model.
    • Will Catch2 again distribute single-header version in the future?
      • No. But we do provide sqlite-style amalgamated distribution option. This means that you can download just 1 .cpp file and 1 header and place them next to your own sources. However, doing this has downsides similar to using the catch_all.hpp header.
    • Why the big breaking change caused by replacing catch.hpp with catch_all.hpp?
      • The convenience header 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.

    (Potentially) Breaking changes

    • Catch2 now uses statically compiled library as its distribution model
      • Including catch.hpp no longer works
    • Catch2 now uses C++14 as the minimum support language version
    • ANON_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)
      • You should use verbosity-modifiers for --list-tests instead
    • --list* commands are now piped through the reporters
      • The top-level reporter interface provides default implementation that works just as the old one
      • XmlReporter outputs a machine-parseable XML
    • TEST_CASE description support has been removed
      • If the second argument has text outside tags, the text will be ignored.
    • Hidden test cases are no longer included just because they don't match an exclusion tag
      • Previously, a TEST_CASE("A", "[.foo]") would be included by asking for ~[bar].
    • PredicateMatcher is no longer type erased.
      • This means that the type of the provided predicate is part of the PredicateMatcher's type
    • SectionInfo no longer contains section description as a member (#1319)
      • You can still write SECTION("ShortName", "Long and wordy description"), but the description is thrown away
      • The description type now must be a const char* or be implicitly convertible to it
    • The [!hide] tag has been removed.
      • Use [.] or [.foo] instead.
    • Lvalues of composed matchers cannot be composed further
    • Uses of REGISTER_TEST_CASE macro need to be followed by a semicolon
      • This does not change TEST_CASE and friends in any way
    • IStreamingReporter::IsMulti member function was removed
      • This is very unlikely to actually affect anyone, as it was default-implemented in the interface, and only used internally
    • Various classes not designed for user-extension have been made final
      • ListeningReporter is now final
      • Concrete Matchers (e.g. UnorderedEquals vector matcher) are now final
      • All Generators are now final
    • Matcher namespacing has been redone
      • Matcher types are no longer in deeply nested namespaces
      • Matcher factory functions are no longer brought into Catch namespace
      • This means that all public-facing matcher-related functionality is now in Catch::Matchers namespace
    • Defining CATCH_CONFIG_MAIN will no longer create main in that TU.
      • Link with libCatch2Main.a, or the proper CMake/pkg-config target
      • If you want to write custom main, include catch2/catch_session.hpp
    • CATCH_CONFIG_EXTERNAL_INTERFACES has been removed.
      • You should instead include the appropriate headers as needed.
    • CATCH_CONFIG_IMPL has been removed.
      • The implementation is now compiled into a static library.
    • Event Listener interface has changed
      • TestEventListenerBase was renamed to EventListenerBase
      • EventListenerBase now directly derives from IStreamingReporter, instead of deriving from StreamingReporterBase
    • GENERATE decays its arguments (#2012, #2040)
      • This means that 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
    • Many changes to reporter interfaces
      • With the exception of the XmlReporter, the outputs of first party reporters should remain the same
      • New pair of events were added
      • One obsolete event was removed
      • The base class has been renamed
      • The built-in reporter class hierarchy has been redone
    • Catch2 generates a random seed if one hasn't been specified by the user
    • The short flag for --list-tests, -l, has been removed.
      • This is not a commonly used flag and does not need to use up valuable single-letter space.
    • The short flag for --list-tags, -t, has been removed.
      • This is not a commonly used flag and does not need to use up valuable single-letter space.
    • The --colour option has been replaced with --colour-mode option

    Improvements

    • Matchers have been extended with the ability to use different signatures of match (#1307, #1553, #1554, #1843)
      • This includes having templated match member function
      • See the rewritten Matchers documentation for details
      • Catch2 currently provides some generic matchers, but there should be more before final release of v3
        • IsEmpty, SizeIs which check that the range has specific properties
        • Contains, which checks whether a range contains a specific element
        • AllMatch, AnyMatch, NoneMatch range matchers, which apply matchers over a range of elements
    • Significant compilation time improvements
      • including catch_test_macros.hpp is 80% cheaper than including catch.hpp
    • Some runtime performance optimizations
      • In all tested cases the v3 branch was faster, so the table below shows the speedup of v3 to v2 at the same task

    | 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 |

    • POSIX platforms use 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
    • Catch2's internal helper variables no longer use reserved identifiers (#578)
    • --rng-seed now accepts string "random-device" to generate random seed using std::random_device
    • Catch2 now supports test sharding (#2257)
      • You can ask for the tests to be split into N groups and only run one of them.
      • This greatly simplifies parallelization of tests in a binary through external runner.
    • The embedded CLI parser now supports repeatedly callable lambdas
      • A lambda-based option parser can opt into being repeatedly specifiable.
    • Added STATIC_CHECK macro, similar to STATIC_REQUIRE (#2318)
      • When deferred tu runtime, it behaves like CHECK, and not like REQUIRE.
    • You can have multiple tests with the same name, as long as other parts of the test identity differ (#1915, #1999, #2175)
      • Test identity includes test's name, test's tags and and test's class name if applicable.
    • Added new warning, UnmatchedTestSpec, to error on test specs with no matching tests
    • The -w, --warn warning flags can now be provided multiple times to enable multiple warnings
    • The case-insensitive handling of tags is now more reliable and takes up less memory
    • Test case and assertion counting can no longer reasonably overflow on 32 bit systems
      • The count is now kept in uint64_t on all platforms, instead of using size_t type.
    • The -o, --out output destination specifiers recognize - as stdout
      • You have to provide it as --out=- to avoid CLI error about missing option
      • The new reporter specification also recognizes - as stdout
    • Multiple reporters can now run at the same time and write to different files (#1712, #2183)
      • To support this, the -r, --reporter flag now also accepts optional output destination
      • For full overview of the semantics of using multiple reporters, look into the reporter documentation
      • To enable the new syntax, reporter names can no longer contain ::.
    • Console colour support has been rewritten and significantly improved
      • The colour implementation based on ANSI colour codes is always available
      • Colour implementations respect their associated stream
        • previously e.g. Win32 impl would change console colour even if Catch2 was writing to a file
      • The colour API is resilient against changing evaluation order of expressions
      • The associated CLI flag and compile-time configuration options have changed
        • For details see the docs for command-line and compile-time Catch2 configuration
    • Added a support for Bazel integration with XML_OUTPUT_FILE env var (#2399)
      • This has to be enabled during compilation.
    • Added --skip-benchmarks flag to run tests without any BENCHMARKs (#2392, #2408)
    • Added option to list all listeners in the binary via --list-listeners

    Fixes

    • The INFO macro no longer contains superfluous semicolon (#1456)
    • The --list* family of command line flags now return 0 on success (#1410, #1146)
    • Various ways of failing a benchmark are now counted and reporter properly
    • The ULP matcher now handles comparing numbers with different signs properly (#2152)
    • Universal ADL-found operators should no longer break decomposition (#2121)
    • Reporter selection is properly case-insensitive
      • Previously it forced lower cased name, which would fail for reporters with upper case characters in name
    • The cumulative reporter base stores benchmark results alongside assertion results
    • Catch2's SE handling should no longer interferes with ASan on Windows (#2334)
    • Fixed Windows console colour handling for tests that redirect stdout (#2345)
    • Fixed issue with the random generators returning the same value over and over again

    Other changes

    • CATCH_CONFIG_DISABLE_MATCHERS no longer exists.
      • If you do not want to use Matchers in a TU, do not include their header.
    • CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER no longer exists.
      • StringMaker specializations for <chrono> are always provided
    • Catch2's CMake now provides 2 targets, Catch2 and Catch2WithMain.
      • Catch2 is the statically compiled implementation by itself
      • Catch2WithMain also links in the default main
    • Catch2's pkg-config integration also provides 2 packages
      • catch2 is the statically compiled implementation by itself
      • catch2-with-main also links in the default main
    • Passing invalid test specifications passed to Catch2 are now reported before tests are run, and are a hard error.
    • Running 0 tests (e.g. due to empty binary, or test spec not matching anything) returns non-0 exit code
      • Flag --allow-running-no-tests overrides this behaviour.
      • NoTests warning has been removed because it is fully subsumed by this change.
    • Catch2's compile-time configuration options (CATCH_CONFIG_FOO) can be set through CMake options of the same name
      • They use the same semantics as C++ defines, including the 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)
    Source code(tar.gz)
    Source code(zip)
    catch_amalgamated.cpp(370.91 KB)
    catch_amalgamated.cpp.asc(833 bytes)
    catch_amalgamated.hpp(448.50 KB)
    catch_amalgamated.hpp.asc(833 bytes)
  • v3.0.0-preview5(Apr 20, 2022)

    This is intended to be the last preview before full release. All API-breaking changes should be accounted for.


    Catch2 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.

    FAQ

    • Why is Catch2 moving to separate headers?
      • The short answer is future extensibility and scalability. The long answer is complex and can be found on my blog, but at the most basic level, it is that providing single-header distribution is at odds with providing variety of useful features. When Catch2 was distributed in a single header, adding a new Matcher would cause overhead for everyone, but was useful only to a subset of users. This meant that the barrier to entry for new Matchers/Generators/etc is high in single header model, but much smaller in the new model.
    • Will Catch2 again distribute single-header version in the future?
      • No. But we do provide sqlite-style amalgamated distribution option. This means that you can download just 1 .cpp file and 1 header and place them next to your own sources. However, doing this has downsides similar to using the catch_all.hpp header.
    • Why the big breaking change caused by replacing catch.hpp with catch_all.hpp?
      • The convenience header 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.

    (Potentially) Breaking changes

    • Catch2 now uses statically compiled library as its distribution model
      • Including catch.hpp no longer works
    • Catch2 now uses C++14 as the minimum support language version
    • ANON_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)
      • You should use verbosity-modifiers for --list-tests instead
    • --list* commands are now piped through the reporters
      • The top-level reporter interface provides default implementation that works just as the old one
      • XmlReporter outputs a machine-parseable XML
    • TEST_CASE description support has been removed
      • If the second argument has text outside tags, the text will be ignored.
    • Hidden test cases are no longer included just because they don't match an exclusion tag
      • Previously, a TEST_CASE("A", "[.foo]") would be included by asking for ~[bar].
    • PredicateMatcher is no longer type erased.
      • This means that the type of the provided predicate is part of the PredicateMatcher's type
    • SectionInfo no longer contains section description as a member (#1319)
      • You can still write SECTION("ShortName", "Long and wordy description"), but the description is thrown away
      • The description type now must be a const char* or be implicitly convertible to it
    • The [!hide] tag has been removed.
      • Use [.] or [.foo] instead.
    • Lvalues of composed matchers cannot be composed further
    • Uses of REGISTER_TEST_CASE macro need to be followed by a semicolon
      • This does not change TEST_CASE and friends in any way
    • IStreamingReporter::IsMulti member function was removed
      • This is very unlikely to actually affect anyone, as it was default-implemented in the interface, and only used internally
    • Various classes not designed for user-extension have been made final
      • ListeningReporter is now final
      • Concrete Matchers (e.g. UnorderedEquals vector matcher) are now final
      • All Generators are now final
    • Matcher namespacing has been redone
      • Matcher types are no longer in deeply nested namespaces
      • Matcher factory functions are no longer brought into Catch namespace
      • This means that all public-facing matcher-related functionality is now in Catch::Matchers namespace
    • Defining CATCH_CONFIG_MAIN will no longer create main in that TU.
      • Link with libCatch2Main.a, or the proper CMake/pkg-config target
      • If you want to write custom main, include catch2/catch_session.hpp
    • CATCH_CONFIG_EXTERNAL_INTERFACES has been removed.
      • You should instead include the appropriate headers as needed.
    • CATCH_CONFIG_IMPL has been removed.
      • The implementation is now compiled into a static library.
    • Event Listener interface has changed
      • TestEventListenerBase was renamed to EventListenerBase
      • EventListenerBase now directly derives from IStreamingReporter, instead of deriving from StreamingReporterBase
    • GENERATE decays its arguments (#2012, #2040)
      • This means that 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
    • Many changes to reporter interfaces
      • With the exception of the XmlReporter, the outputs of first party reporters should remain the same
      • New pair of events were added
      • One obsolete event was removed
      • The base class has been renamed
      • The built-in reporter class hierarchy has been redone
    • Catch2 generates a random seed if one hasn't been specified by the user
    • The short flag for --list-tests, -l, has been removed.
      • This is not a commonly used flag and does not need to use up valuable single-letter space.
    • The short flag for --list-tags, -t, has been removed.
      • This is not a commonly used flag and does not need to use up valuable single-letter space.
    • The --colour option has been replaced with --colour-mode option

    Improvements

    • Matchers have been extended with the ability to use different signatures of match (#1307, #1553, #1554, #1843)
      • This includes having templated match member function
      • See the rewritten Matchers documentation for details
      • Catch2 currently provides some generic matchers, but there should be more before final release of v3
        • IsEmpty, SizeIs which check that the range has specific properties
        • Contains, which checks whether a range contains a specific element
        • AllMatch, AnyMatch, NoneMatch range matchers, which apply matchers over a range of elements
    • Significant compilation time improvements
      • including catch_test_macros.hpp is 80% cheaper than including catch.hpp
    • Some runtime performance optimizations
      • In all tested cases the v3 branch was faster, so the table below shows the speedup of v3 to v2 at the same task

    | 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 |

    • POSIX platforms use 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
    • Catch2's internal helper variables no longer use reserved identifiers (#578)
    • --rng-seed now accepts string "random-device" to generate random seed using std::random_device
    • Catch2 now supports test sharding (#2257)
      • You can ask for the tests to be split into N groups and only run one of them.
      • This greatly simplifies parallelization of tests in a binary through external runner.
    • The embedded CLI parser now supports repeatedly callable lambdas
      • A lambda-based option parser can opt into being repeatedly specifiable.
    • Added STATIC_CHECK macro, similar to STATIC_REQUIRE (#2318)
      • When deferred tu runtime, it behaves like CHECK, and not like REQUIRE.
    • You can have multiple tests with the same name, as long as other parts of the test identity differ (#1915, #1999, #2175)
      • Test identity includes test's name, test's tags and and test's class name if applicable.
    • Added new warning, UnmatchedTestSpec, to error on test specs with no matching tests
    • The -w, --warn warning flags can now be provided multiple times to enable multiple warnings
    • The case-insensitive handling of tags is now more reliable and takes up less memory
    • Test case and assertion counting can no longer reasonably overflow on 32 bit systems
      • The count is now kept in uint64_t on all platforms, instead of using size_t type.
    • The -o, --out output destination specifiers recognize - as stdout
      • You have to provide it as --out=- to avoid CLI error about missing option
      • The new reporter specification also recognizes - as stdout
    • Multiple reporters can now run at the same time and write to different files (#1712, #2183)
      • To support this, the -r, --reporter flag now also accepts optional output destination
      • For full overview of the semantics of using multiple reporters, look into the reporter documentation
      • To enable the new syntax, reporter names can no longer contain ::.
    • Console colour support has been rewritten and significantly improved
      • The colour implementation based on ANSI colour codes is always available
      • Colour implementations respect their associated stream
        • previously e.g. Win32 impl would change console colour even if Catch2 was writing to a file
      • The colour API is resilient against changing evaluation order of expressions
      • The associated CLI flag and compile-time configuration options have changed
        • For details see the docs for command-line and compile-time Catch2 configuration
    • Added a support for Bazel integration with XML_OUTPUT_FILE env var (#2399)
      • This has to be enabled during compilation.

    Fixes

    • The INFO macro no longer contains superfluous semicolon (#1456)
    • The --list* family of command line flags now return 0 on success (#1410, #1146)
    • Various ways of failing a benchmark are now counted and reporter properly
    • The ULP matcher now handles comparing numbers with different signs properly (#2152)
    • Universal ADL-found operators should no longer break decomposition (#2121)
    • Reporter selection is properly case-insensitive
      • Previously it forced lower cased name, which would fail for reporters with upper case characters in name
    • The cumulative reporter base stores benchmark results alongside assertion results
    • Catch2's SE handling should no longer interferes with ASan on Windows (#2334)
    • Fixed Windows console colour handling for tests that redirect stdout (#2345)

    Other changes

    • CATCH_CONFIG_DISABLE_MATCHERS no longer exists.
      • If you do not want to use Matchers in a TU, do not include their header.
    • CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER no longer exists.
      • StringMaker specializations for <chrono> are always provided
    • Catch2's CMake now provides 2 targets, Catch2 and Catch2WithMain.
      • Catch2 is the statically compiled implementation by itself
      • Catch2WithMain also links in the default main
    • Catch2's pkg-config integration also provides 2 packages
      • catch2 is the statically compiled implementation by itself
      • catch2-with-main also links in the default main
    • Passing invalid test specifications passed to Catch2 are now reported before tests are run, and are a hard error.
    • Running 0 tests (e.g. due to empty binary, or test spec not matching anything) returns non-0 exit code
      • Flag --allow-running-no-tests overrides this behaviour.
      • NoTests warning has been removed because it is fully subsumed by this change.
    • Catch2's compile-time configuration options (CATCH_CONFIG_FOO) can be set through CMake options of the same name
      • They use the same semantics as C++ defines, including the 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)
    Source code(tar.gz)
    Source code(zip)
    catch_amalgamated.cpp(354.06 KB)
    catch_amalgamated.cpp.asc(833 bytes)
    catch_amalgamated.hpp(430.55 KB)
    catch_amalgamated.hpp.asc(833 bytes)
  • v3.0.0-preview4(Jan 3, 2022)

    Catch2 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.

    For quick'n'dirty migration, you can replace the old #include <catch2/catch.hpp> with #include <catch2/catch_all.hpp>. This is a (one of) convenience header(s) that brings in all of headers in Catch2. By doing this, you should be able to migrate instantly, but at the cost of (significantly) increased compilation times. You should prefer piecemeal including headers that are actually required by your test code.

    The basic set of functionality (TEST_CASE, SECTION, REQUIRE) is in catch2/catch_test_macros.hpp. Matchers are in matchers subfolder, generators in generators subfolder, and so on.

    Note that while most documentation has been updated to the new design, it is still a work in progress.

    FAQ

    • Why is Catch2 moving to separate headers?
      • The short answer is future extensibility and scalability. The long answer is complex and can be found on my blog, but at the most basic level, it is that providing single-header distribution is at odds with providing variety of useful features. When Catch2 was distributed in a single header, adding a new Matcher would cause overhead for everyone, but was useful only to a subset of users. This meant that the barrier to entry for new Matchers/Generators/etc is high in single header model, but much smaller in the new model.
    • Will Catch2 again distribute single-header version in the future?
      • No. But we do provide sqlite-style amalgamated distribution option. This means that you can download just 1 .cpp file and 1 header and place them next to your own sources. However, doing this has downsides similar to using the catch_all.hpp header.
    • Why the big breaking change caused by replacing catch.hpp with catch_all.hpp?
      • The convenience header 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.

    (Potentially) Breaking changes

    • Catch2 now uses statically compiled library as its distribution model
      • Including catch.hpp no longer works
    • Catch2 now uses C++14 as the minimum support language version
    • ANON_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)
      • You should use verbosity-modifiers for --list-tests instead
    • --list* commands are now piped through the reporters
      • The top-level reporter interface provides default implementation that works just as the old one
      • XmlReporter outputs a machine-parseable XML
    • TEST_CASE description support has been removed
      • If the second argument has text outside tags, the text will be ignored.
    • Hidden test cases are no longer included just because they don't match an exclusion tag
      • Previously, a TEST_CASE("A", "[.foo]") would be included by asking for ~[bar].
    • PredicateMatcher is no longer type erased.
      • This means that the type of the provided predicate is part of the PredicateMatcher's type
    • SectionInfo no longer contains section description as a member (#1319)
      • You can still write SECTION("ShortName", "Long and wordy description"), but the description is thrown away
      • The description type now must be a const char* or be implicitly convertible to it
    • The [!hide] tag has been removed.
      • Use [.] or [.foo] instead.
    • Lvalues of composed matchers cannot be composed further
    • Uses of REGISTER_TEST_CASE macro need to be followed by a semicolon
      • This does not change TEST_CASE and friends in any way
    • IStreamingReporter::IsMulti member function was removed
      • This is very unlikely to actually affect anyone, as it was default-implemented in the interface, and only used internally
    • Various classes not designed for user-extension have been made final
      • ListeningReporter is now final
      • Concrete Matchers (e.g. UnorderedEquals vector matcher) are now final
      • All Generators are now final
    • Matcher namespacing has been redone
      • Matcher types are no longer in deeply nested namespaces
      • Matcher factory functions are no longer brought into Catch namespace
      • This means that all public-facing matcher-related functionality is now in Catch::Matchers namespace
    • Defining CATCH_CONFIG_MAIN will no longer create main in that TU.
      • Link with libCatch2Main.a, or the proper CMake/pkg-config target
      • If you want to write custom main, include catch2/catch_session.hpp
    • CATCH_CONFIG_EXTERNAL_INTERFACES has been removed.
      • You should instead include the appropriate headers as needed.
    • CATCH_CONFIG_IMPL has been removed.
      • The implementation is now compiled into a static library.
    • Event Listener interface has changed
      • TestEventListenerBase was renamed to EventListenerBase
      • EventListenerBase now directly derives from IStreamingReporter, instead of deriving from StreamingReporterBase
    • GENERATE decays its arguments (#2012, #2040)
      • This means that 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
    • Many changes to reporter interfaces
      • With the exception of the XmlReporter, the outputs of first party reporters should remain the same
      • New pair of events were added
      • One obsolete event was removed
    • Catch2 generates a random seed if one hasn't been specified by the user
    • The short flag for --list-tests, -l, has been removed.
      • This is not a commonly used flag and does not need to use up valuable single-letter space.
    • The short flag for --list-tags, -t, has been removed.
      • This is not a commonly used flag and does not need to use up valuable single-letter space.

    Improvements

    • Matchers have been extended with the ability to use different signatures of match (#1307, #1553, #1554, #1843)
      • This includes having templated match member function
      • See the rewritten Matchers documentation for details
      • Catch2 currently provides some generic matchers, but there should be more before final release of v3
        • IsEmpty, SizeIs which check that the range has specific properties
        • Contains, which checks whether a range contains a specific element
        • AllMatch, AnyMatch, NoneMatch range matchers, which apply matchers over a range of elements
    • Significant compilation time improvements
      • including catch_test_macros.hpp is 80% cheaper than including catch.hpp
    • Some runtime performance optimizations
      • In all tested cases the v3 branch was faster, so the table below shows the speedup of v3 to v2 at the same task

    | 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 |

    • POSIX platforms use 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
    • Catch2's internal helper variables no longer use reserved identifiers (#578)
    • --rng-seed now accepts string "random-device" to generate random seed using std::random_device
    • Catch2 now supports test sharding (#2257)
      • You can ask for the tests to be split into N groups and only run one of them.
      • This greatly simplifies parallelization of tests in a binary through external runner.
    • The embedded CLI parser now supports repeatedly callable lambdas
      • A lambda-based option parser can opt into being repeatedly specifiable.
    • Added STATIC_CHECK macro, similar to STATIC_REQUIRE (#2318)
      • When deferred tu runtime, it behaves like CHECK, and not like REQUIRE.
    • You can have multiple tests with the same name, as long as other parts of the test identity differ (#1915, #1999, #2175)
      • Test identity includes test's name, test's tags and and test's class name if applicable.
    • Added new warning, UnmatchedTestSpec, to error on test specs with no matching tests
    • The -w, --warn warning flags can now be provided multiple times to enable multiple warnings
    • The case-insensitive handling of tags is now more reliable and takes up less memory
    • Test case and assertion counting can no longer reasonably overflow on 32 bit systems
      • The count is now kept in uint64_t on all platforms, instead of using size_t type.
    • The -o, --out output destination specifiers recognize - as stdout
      • You have to provide it as --out=- to avoid CLI error about missing option
      • The new reporter specification also recognizes - as stdout
    • Multiple reporters can now run at the same time and write to different files (#1712, #2183)
      • To support this, the -r, --reporter flag now also accepts optional output destination
      • For full overview of the semantics of using multiple reporters, look into the reporter documentation

    Fixes

    • The INFO macro no longer contains superfluous semicolon (#1456)
    • The --list* family of command line flags now return 0 on success (#1410, #1146)
    • Various ways of failing a benchmark are now counted and reporter properly
    • The ULP matcher now handles comparing numbers with different signs properly (#2152)
    • Universal ADL-found operators should no longer break decomposition (#2121)
    • Reporter selection is properly case-insensitive
      • Previously it forced lower cased name, which would fail for reporters with upper case characters in name
    • The cumulative reporter base stores benchmark results alongside assertion results
    • Catch2's SE handling should no longer interferes with ASan on Windows (#2334)

    Other changes

    • CATCH_CONFIG_DISABLE_MATCHERS no longer exists.
      • If you do not want to use Matchers in a TU, do not include their header.
    • CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER no longer exists.
      • StringMaker specializations for <chrono> are always provided
    • Catch2's CMake now provides 2 targets, Catch2 and Catch2WithMain.
      • Catch2 is the statically compiled implementation by itself
      • Catch2WithMain also links in the default main
    • Catch2's pkg-config integration also provides 2 packages
      • catch2 is the statically compiled implementation by itself
      • catch2-with-main also links in the default main
    • Passing invalid test specifications passed to Catch2 are now reported before tests are run, and are a hard error.
    • Running 0 tests (e.g. due to empty binary, or test spec not matching anything) returns non-0 exit code
      • Flag --allow-running-no-tests overrides this behaviour.
      • NoTests warning has been removed because it is fully subsumed by this change.
    Source code(tar.gz)
    Source code(zip)
    catch_amalgamated.cpp(342.36 KB)
    catch_amalgamated.cpp.asc(833 bytes)
    catch_amalgamated.hpp(420.80 KB)
    catch_amalgamated.hpp.asc(833 bytes)
  • v2.13.8(Jan 3, 2022)

    Fixes

    • Made Approx::operator() const (#2288)
    • Improved pkg-config files (#2284)
    • Fixed warning suppression leaking out of Catch2 when compiled with clang.exe (#2280)
    • The macro-generated names for things like TEST_CASE no longer create reserved identifiers (#2336)

    Improvements

    • Clang-tidy should no longer warn about missing virtual dispatch in FilterGenerator's constructor (#2314)
    Source code(tar.gz)
    Source code(zip)
    catch.hpp(641.77 KB)
    catch.hpp.asc(833 bytes)
    catch_reporter_automake.hpp(2.21 KB)
    catch_reporter_automake.hpp.asc(833 bytes)
    catch_reporter_sonarqube.hpp(7.09 KB)
    catch_reporter_sonarqube.hpp.asc(833 bytes)
    catch_reporter_tap.hpp(9.60 KB)
    catch_reporter_tap.hpp.asc(833 bytes)
    catch_reporter_teamcity.hpp(8.70 KB)
    catch_reporter_teamcity.hpp.asc(833 bytes)
  • v2.13.7(Jul 28, 2021)

    Fixes

    • Added missing <iterator> include in benchmarking. (#2231)
    • Fixed noexcept build with benchmarking enabled (#2235)
    • Fixed build for compilers with C++17 support but without C++17 library support (#2195)
    • JUnit only uses 3 decimal places when reporting durations (#2221)
    • !mayfail tagged tests are now marked as skipped in JUnit reporter output (#2116)
    Source code(tar.gz)
    Source code(zip)
    catch.hpp(642.47 KB)
    catch.hpp.asc(833 bytes)
    catch_reporter_automake.hpp(2.21 KB)
    catch_reporter_automake.hpp.asc(833 bytes)
    catch_reporter_sonarqube.hpp(7.09 KB)
    catch_reporter_sonarqube.hpp.asc(833 bytes)
    catch_reporter_tap.hpp(9.60 KB)
    catch_reporter_tap.hpp.asc(833 bytes)
    catch_reporter_teamcity.hpp(8.70 KB)
    catch_reporter_teamcity.hpp.asc(833 bytes)
  • v2.13.5(Apr 10, 2021)

    Improvements

    • Detection of MAC and IPHONE platforms has been improved (#2140, #2157)
    • Added workaround for bug in XLC 16.1.0.1 (#2155)
    • Add detection for LCC when it is masquerading as GCC (#2199)
    • Modified posix signal handling so it supports newer libcs (#2178)
      • MINSIGSTKSZ was no longer usable in constexpr context.

    Fixes

    • Fixed compilation of benchmarking when min and max macros are defined (#2159)
      • Including windows.h without NOMINMAX remains a really bad idea, don't do it

    Miscellaneous

    • Catch2WithMain target (static library) is no longer built by default (#2142)
      • Building it by default was at best unnecessary overhead for people not using it, and at worst it caused trouble with install paths
      • To have it built, set CMake option CATCH_BUILD_STATIC_LIBRARY to ON
    • The check whether Catch2 is being built as a subproject is now more reliable (#2202, #2204)
      • The problem was that if the variable name used internally was defined the project including Catch2 as subproject, it would not be properly overwritten for Catch2's CMake.
    Source code(tar.gz)
    Source code(zip)
    catch.hpp(641.48 KB)
    catch.hpp.asc(833 bytes)
    catch_reporter_automake.hpp(2.21 KB)
    catch_reporter_automake.hpp.asc(833 bytes)
    catch_reporter_sonarqube.hpp(7.09 KB)
    catch_reporter_sonarqube.hpp.asc(833 bytes)
    catch_reporter_tap.hpp(9.60 KB)
    catch_reporter_tap.hpp.asc(833 bytes)
    catch_reporter_teamcity.hpp(8.70 KB)
    catch_reporter_teamcity.hpp.asc(833 bytes)
  • v2.13.4(Dec 29, 2020)

    Improvements

    • Improved the hashing algorithm used for shuffling test cases (#2070)
      • TEST_CASEs that differ only in the last character should be properly shuffled
      • Note that this means that v2.13.4 gives you a different order of test cases than 2.13.3, even given the same seed.

    Miscellaneous

    • Deprecated ParseAndAddCatchTests CMake integration (#2092)
      • It is impossible to implement it properly for all the different test case variants Catch2 provides, and there are better options provided.
      • Use catch_discover_tests instead, which uses runtime information about available tests.
    • Fixed bug in catch_discover_tests that would cause it to fail when used in specific project structures (#2119)
    • Added Bazel build file
    • Added an experimental static library target to CMake
    Source code(tar.gz)
    Source code(zip)
    catch.hpp(638.03 KB)
    catch.hpp.asc(833 bytes)
    catch_reporter_automake.hpp(2.21 KB)
    catch_reporter_automake.hpp.asc(833 bytes)
    catch_reporter_sonarqube.hpp(7.09 KB)
    catch_reporter_sonarqube.hpp.asc(833 bytes)
    catch_reporter_tap.hpp(9.60 KB)
    catch_reporter_tap.hpp.asc(833 bytes)
    catch_reporter_teamcity.hpp(8.70 KB)
    catch_reporter_teamcity.hpp.asc(833 bytes)
  • v2.13.3(Oct 31, 2020)

    Fixes

    • Fixed possible infinite loop when combining generators with section filter (-c option) (#2025)

    Miscellaneous

    • Fixed ParseAndAddCatchTests not finding TEST_CASEs without tags (#2055, #2056)
    • ParseAndAddCatchTests supports CMP0110 policy for changing behaviour of add_test (#2057)
      • This was the shortlived change in CMake 3.18.0 that temporarily broke ParseAndAddCatchTests
    Source code(tar.gz)
    Source code(zip)
    catch.hpp(637.81 KB)
    catch.hpp.asc(833 bytes)
    catch_reporter_automake.hpp(2.21 KB)
    catch_reporter_automake.hpp.asc(833 bytes)
    catch_reporter_sonarqube.hpp(7.09 KB)
    catch_reporter_sonarqube.hpp.asc(833 bytes)
    catch_reporter_tap.hpp(9.60 KB)
    catch_reporter_tap.hpp.asc(833 bytes)
    catch_reporter_teamcity.hpp(8.70 KB)
    catch_reporter_teamcity.hpp.asc(833 bytes)
  • v3.0.0-preview3(Oct 8, 2020)

    Changes compared to preview 2

    • Incorporated v2 changes up to v2.13.2
    • Some runtime performance improvements
    • The static library compiles 20-30% faster
    • The overhead of including catch_test_macros.hpp is 25-30% smaller
    • Amalgamated, 1 .hpp + 1 .cpp, distribution is provided
    • Reporter interface has slightly changed
    • Listener base renamed
    • Rewritten contributing documentation
      • Primary development is now on devel branch
      • v3 is now the primary development version

    Changes compared to v2 releases

    Catch2 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.

    For quick'n'dirty migration, you can replace the old #include <catch2/catch.hpp> with #include <catch2/catch_all.hpp>. This is a (one of) convenience header(s) that brings in all of headers in Catch2. By doing this, you should be able to migrate instantly, but at the cost of (significantly) increased compilation times. You should prefer piecemeal including headers that are actually required by your test code.

    The basic set of functionality (TEST_CASE, SECTION, REQUIRE) is in catch2/catch_test_macros.hpp. Matchers are in matchers subfolder, generators in generators subfolder, and so on.

    Note that documentation has not yet been updated to account for the new design.

    FAQ

    • Why is Catch2 moving to separate headers?
      • The short answer is future extensibility and scalability. The long answer is complex and can be found on my blog, but at the most basic level, it is that providing single-header distribution is at odds with providing variety of useful features. When Catch2 was distributed in a single header, adding a new Matcher would cause overhead for everyone, but was useful only to a subset of users. This meant that the barrier to entry for new Matchers/Generators/etc is high in single header model, but much smaller in the new model.
    • Will Catch2 again distribute single-header version in the future?
      • No. But we do provide sqlite-style amalgamated distribution option. This means that you can download just 1 .cpp file and 1 header and place them next to your own sources. However, doing this has downsides similar to using the catch_all.hpp header.
    • Why the big breaking change caused by replacing catch.hpp with catch_all.hpp?
      • The convenience header 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 concious decision by the user, not something they can just stumble into unknowingly.

    (Potentially) Breaking changes

    • Catch2 now uses statically compiled library as its distribution model
      • Including catch.hpp no longer works
    • ANON_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)
      • You should use verbosity-modifiers for --list-tests instead
    • --list* commands are now piped through the reporters
      • The top-level reporter interface provides default implementation that works just as the old one
      • XmlReporter outputs a machine-parseable XML
    • TEST_CASE description support has been removed
      • If the second argument has text outside tags, the text will be ignored.
    • Hidden test cases are no longer included just because they don't match an exclusion tag
      • Previously, a TEST_CASE("A", "[.foo]") would be included by asking for ~[bar].
    • PredicateMatcher is no longer type erased.
      • This means that the type of the provided predicate is part of the PredicateMatcher's type
    • SectionInfo no longer contains section description as a member (#1319)
      • You can still write SECTION("ShortName", "Long and wordy description"), but the description is thrown away
      • The description type now must be a const char* or be implicitly convertible to it
    • The [!hide] tag has been removed.
      • Use [.] or [.foo] instead.
    • Lvalues of composed matchers cannot be composed further
    • Uses of REGISTER_TEST_CASE macro need to be followed by a semicolon
      • This does not change TEST_CASE and friends in any way
    • IStreamingReporter::IsMulti member function was removed
      • This is very unlikely to actually affect anyone, as it was default-implemented in the interface, and only used internally
    • Various classes not designed for user-extension have been made final
      • ListeningReporter is now final
      • Concrete Matchers (e.g. UnorderedEquals vector matcher) are now final
      • All Generators are now final
    • Matcher namespacing has been redone
      • Matcher types are no longer in deeply nested namespaces
      • Matcher factory functions are no longer brought into Catch namespace
      • This means that all public-facing matcher-related functionality is now in Catch::Matchers namespace
    • Defining CATCH_CONFIG_MAIN will no longer create main in that TU.
      • Link with libCatch2Main.a, or the proper CMake/pkg-config target
      • If you want to write custom main, include catch2/catch_session.hpp
    • CATCH_CONFIG_EXTERNAL_INTERFACES has been removed.
      • You should instead include the appropriate headers as needed.
    • CATCH_CONFIG_IMPL has been removed.
      • The implementation is now compiled into a static library.
    • Event Listener interface has changed
      • TestEventListenerBase was renamed to EventListenerBase
      • EventListenerBase now directly derives from IStreamingReporter, instead of deriving from StreamingReporterBase

    Improvements

    • Matchers have been extended with the ability to use different signatures of match (#1307, #1553, #1554, #1843)
      • This includes having templated match member function
      • See the rewritten Matchers documentation for details
      • Catch2 currently provides some generic matchers, but there should be more before final release of v3
        • So far, IsEmpty, SizeIs, and Contains are provided.
        • At least ElementsAre and UnorderedElementsAre are planned.
    • Some runtime performance improvements
    • Significant compilation time improvements
      • including catch_test_macros.hpp is 80% cheaper than including catch.hpp

    Fixes

    • The INFO macro no longer contains superfluous semicolon (#1456)
    • The --list* family of command line flags now return 0 on success (#1410, #1146)

    Other changes

    • CATCH_CONFIG_DISABLE_MATCHERS no longer exists.
      • If you do not want to use Matchers in a TU, do not include their header.
    • CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER no longer exists.
      • StringMaker specializations for <chrono> are always provided
    • Catch2's CMake now provides 2 targets, Catch2 and Catch2WithMain.
      • Catch2 is the statically compiled implementation by itself
      • Catch2WithMain also links in the default main
    • Catch2's pkg-config integration also provides 2 packages
      • catch2 is the statically compiled implementation by itself
      • catch2-with-main also links in the default main
    Source code(tar.gz)
    Source code(zip)
  • v2.13.2(Oct 7, 2020)

    There are two things of importance here. The first is that after this release, I am making the v3 branch the main development branch, and will instead branch off a maintenance branch for v2.

    The other is that you should watch this video by my friend, JeanHeyd Meneide, on his experiences with the C++ community.

    Improvements

    • Implemented workaround for AppleClang shadowing bug (#2030)
    • Implemented workaround for NVCC ICE (#2005, #2027)

    Fixes

    • Fixed detection of std::uncaught_exceptions support under non-msvc platforms (#2021)
    • Fixed the experimental stdout/stderr capture under Windows (#2013)

    Miscellaneous

    • catch_discover_tests has been improved significantly (#2023, #2039)
      • You can now specify which reporter should be used
      • You can now modify where the output will be written
      • WORKING_DIRECTORY setting is respected
    • ParseAndAddCatchTests now supports TEMPLATE_TEST_CASE macros (#2031)
    • Various documentation fixes and improvements (#2022, #2028, #2034)
    Source code(tar.gz)
    Source code(zip)
    catch.hpp(635.55 KB)
    catch.hpp.asc(833 bytes)
    catch_reporter_automake.hpp(2.15 KB)
    catch_reporter_automake.hpp.asc(833 bytes)
    catch_reporter_sonarqube.hpp(6.92 KB)
    catch_reporter_sonarqube.hpp.asc(833 bytes)
    catch_reporter_tap.hpp(9.35 KB)
    catch_reporter_tap.hpp.asc(833 bytes)
    catch_reporter_teamcity.hpp(8.48 KB)
    catch_reporter_teamcity.hpp.asc(833 bytes)
  • v2.13.1(Sep 7, 2020)

    Improvements

    • ParseAndAddCatchTests handles CMake v3.18.0 correctly (#1984)
    • Improved autodetection of std::byte (#1992)
    • Simplified implementation of templated test cases (#2007)
      • This should have a tiny positive effect on its compilation throughput

    Fixes

    • Automatic stringification of ranges handles sentinel ranges properly (#2004)
    Source code(tar.gz)
    Source code(zip)
    catch.hpp(634.85 KB)
    catch.hpp.asc(833 bytes)
    catch_reporter_automake.hpp(2.21 KB)
    catch_reporter_automake.hpp.asc(833 bytes)
    catch_reporter_sonarqube.hpp(7.09 KB)
    catch_reporter_sonarqube.hpp.asc(833 bytes)
    catch_reporter_tap.hpp(9.60 KB)
    catch_reporter_tap.hpp.asc(833 bytes)
    catch_reporter_teamcity.hpp(8.70 KB)
    catch_reporter_teamcity.hpp.asc(833 bytes)
  • v2.13.0(Jul 12, 2020)

    Improvements

    • GENERATE can now follow a SECTION at the same level of nesting (#1938)
      • The SECTION(s) before the GENERATE will not be run multiple times, the following ones will.
    • Added -D/--min-duration command line flag (#1910)
      • If a test takes longer to finish than the provided value, its name and duration will be printed.
      • This flag is overriden by setting -d/--duration.

    Fixes

    • TAPReporter no longer skips successful assertions (#1983)
    Source code(tar.gz)
    Source code(zip)
    catch.hpp(634.77 KB)
    catch.hpp.asc(833 bytes)
    catch_reporter_automake.hpp(2.21 KB)
    catch_reporter_automake.hpp.asc(833 bytes)
    catch_reporter_sonarqube.hpp(7.09 KB)
    catch_reporter_sonarqube.hpp.asc(833 bytes)
    catch_reporter_tap.hpp(9.60 KB)
    catch_reporter_tap.hpp.asc(833 bytes)
    catch_reporter_teamcity.hpp(8.70 KB)
    catch_reporter_teamcity.hpp.asc(833 bytes)
  • v2.12.3(Jun 29, 2020)

    Fixes

    • GENERATE nested in a for loop no longer creates multiple generators (#1913)
    • Fixed copy paste error breaking TEMPLATE_TEST_CASE_SIG for 6 or more arguments (#1954)
    • Fixed potential UB when handling non-ASCII characters in CLI args (#1943)

    Improvements

    • There can be multiple calls to GENERATE on a single line
    • Improved fno-except support for platforms that do not provide shims for exception-related std functions (#1950)
      • E.g. the Green Hills C++ compiler
    • XmlReporter now also reports test-case-level statistics (#1958)
      • This is done via a new element, OverallResultsCases

    Miscellaneous

    • Added .clang-format file to the repo (#1182, #1920)
    • Rewrote contributing docs
      • They should explain the different levels of testing and so on much better
    Source code(tar.gz)
    Source code(zip)
    catch.hpp(632.69 KB)
    catch.hpp.asc(833 bytes)
    catch_reporter_automake.hpp(2.21 KB)
    catch_reporter_automake.hpp.asc(833 bytes)
    catch_reporter_sonarqube.hpp(7.09 KB)
    catch_reporter_sonarqube.hpp.asc(833 bytes)
    catch_reporter_tap.hpp(9.60 KB)
    catch_reporter_tap.hpp.asc(833 bytes)
    catch_reporter_teamcity.hpp(8.70 KB)
    catch_reporter_teamcity.hpp.asc(833 bytes)
  • v2.12.2(May 25, 2020)

    Fixes

    • Fixed compilation failure if is_range ADL found deleted function (#1929)
    • Fixed potential UB in CAPTURE if the expression contained non-ASCII characters (#1925)

    Improvements

    • std::result_of is not used if std::invoke_result is available (#1934)
    • JUnit reporter writes out status attribute for tests (#1899)
    • Suppresed clang-tidy's hicpp-vararg warning (#1921)
      • Catch2 was already suppressing the cppcoreguidelines-pro-type-vararg alias of the warning
    Source code(tar.gz)
    Source code(zip)
    catch.hpp(629.93 KB)
    catch.hpp.asc(819 bytes)
    catch_reporter_automake.hpp(2.21 KB)
    catch_reporter_automake.hpp.asc(819 bytes)
    catch_reporter_sonarqube.hpp(7.09 KB)
    catch_reporter_sonarqube.hpp.asc(819 bytes)
    catch_reporter_tap.hpp(9.60 KB)
    catch_reporter_tap.hpp.asc(819 bytes)
    catch_reporter_teamcity.hpp(8.70 KB)
    catch_reporter_teamcity.hpp.asc(819 bytes)
  • v3.0.0-preview2(May 14, 2020)

    Catch2 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.

    For quick'n'dirty migration, you can replace the old #include <catch2/catch.hpp> with #include <catch2/catch_all.hpp>. This is a (one of) convenience header(s) that brings in all of headers in Catch2. By doing this, you should be able to migrate instantly, but at the cost of (significantly) increased compilation times. You should prefer piecemeal including headers that are actually required by your test code.

    The basic set of functionality (TEST_CASE, SECTION, REQUIRE) is in catch2/catch_test_macros.hpp. Matchers are in matchers subfolder, generators in generators subfolder, and so on.

    Note that documentation has not yet been updated to account for the new design.

    FAQ

    • Why is Catch2 moving to separate headers?
      • The short answer is future extensibility and scalability. The long answer is complex and can be found on my blog, but at the most basic level, it is that providing single-header distribution is at odds with providing variety of useful features. When Catch2 was distributed in a single header, adding a new Matcher would cause overhead for everyone, but was useful only to a subset of users. This meant that the barrier to entry for new Matchers/Generators/etc is high in single header model, but much smaller in the new model.
    • Will Catch2 again distribute single-header version in the future?
      • No. But I intend to provide sqlite-style distribution option, with 1 header and 1 "unity" .cpp file. Do note that the header will have similar problem to the catch_all.hpp header.
    • Why the big breaking change caused by replacing catch.hpp with catch_all.hpp?
      • The convenience header 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 concious decision by the user, not something they can just stumble into unknowingly.
    • Why does CMake/pkg-config/etc report version 3.0.0?
      • Lot of tooling does not handle preview versions too well, so we have to use proper new major version. The final release will use version 3.0.1 to avoid conflicts with these preview versions.

    (Potentially) Breaking changes

    • Catch2 now uses statically compiled library as its distribution model
      • Including catch.hpp no longer works
    • ANON_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)
      • You should use verbosity-modifiers for --list-tests instead
    • --list* commands are now piped through the reporters
      • The top-level reporter interface provides default implementation that works just as the old one
      • XmlReporter outputs a machine-parseable XML
    • TEST_CASE description support has been removed
      • If the second argument has text outside tags, the text will be ignored.
    • Hidden test cases are no longer included just because they don't match an exclusion tag
      • Previously, a TEST_CASE("A", "[.foo]") would be included by asking for ~[bar].
    • PredicateMatcher is no longer type erased.
      • This means that the type of the provided predicate is part of the PredicateMatcher's type
    • SectionInfo no longer contains section description as a member (#1319)
      • You can still write SECTION("ShortName", "Long and wordy description"), but the description is thrown away
      • The description type now must be a const char* or be implicitly convertible to it
    • The [!hide] tag has been removed.
      • Use [.] or [.foo] instead.
    • Lvalues of composed matchers cannot be composed further
    • Uses of REGISTER_TEST_CASE macro need to be followed by a semicolon
      • This does not change TEST_CASE and friends in any way
    • IStreamingReporter::IsMulti member function was removed
      • This is very unlikely to actually affect anyone, as it was default-implemented in the interface, and only used internally
    • Various classes not designed for user-extension have been made final
      • ListeningReporter is now final
      • Concrete Matchers (e.g. UnorderedEquals vector matcher) are now final
      • All Generators are now final
    • Matcher namespacing has been redone
      • Matcher types are no longer in deeply nested namespaces
      • Matcher factory functions are no longer brought into Catch namespace
      • This means that all public-facing matcher-related functionality is now in Catch::Matchers namespace
    • Defining CATCH_CONFIG_MAIN will no longer create main in that TU.
      • Link with libCatch2Main.a, or the proper CMake/pkg-config target
      • If you want to write custom main, include catch2/catch_session.hpp
    • CATCH_CONFIG_EXTERNAL_INTERFACES has been removed.
      • You should instead include the appropriate headers as needed.
    • CATCH_CONFIG_IMPL has been removed.
      • The implementation is now compiled into a static library.

    Improvements

    • Matchers have been extended with the ability to use different signatures of match (#1307, #1553, #1554, #1843)
      • This includes having templated match member function
      • See the rewritten Matchers documentation for details
      • Catch2 currently provides some generic matchers, but there should be more before final release of v3
        • So far, IsEmpty, SizeIs, and Contains are provided.
        • At least ElementsAre and UnorderedElementsAre are planned.

    Fixes

    • The INFO macro no longer contains superfluous semicolon (#1456)
    • The --list* family of command line flags now return 0 on success (#1410, #1146)

    Other changes

    • CATCH_CONFIG_DISABLE_MATCHERS no longer exists.
      • If you do not want to use Matchers in a TU, do not include their header.
    • CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER no longer exists.
      • StringMaker specializations for <chrono> are always provided
    • Catch2's CMake now provides 2 targets, Catch2 and Catch2WithMain.
      • Catch2 is the statically compiled implementation by itself
      • Catch2WithMain also links in the default main
    • Catch2's pkg-config integration also provides 2 packages
      • catch2 is the statically compiled implementation by itself
      • catch2-with-main also links in the default main
    Source code(tar.gz)
    Source code(zip)
  • v2.12.0(Apr 21, 2020)

    Improvements

    • Running tests in random order (--order rand) has been reworked significantly (#1908)
      • Given same seed, all platforms now produce the same order
      • Given same seed, the relative order of tests does not change if you select only a subset of them
    • Vector matchers support custom allocators (#1909)
    • | and & (bitwise or and bitwise and) are now supported in CHECK and REQUIRE
      • The resulting type must be convertible to bool

    Fixes

    • Fixed computation of benchmarking column widths in ConsoleReporter (#1885, #1886)
    • Suppressed clang-tidy's cppcoreguidelines-pro-type-vararg in assertions (#1901)
      • It was a false positive trigered by the new warning support workaround
    • Fixed bug in test specification parser handling of OR'd patterns using escaping (#1905)

    Miscellaneous

    • Worked around IBM XL's codegen bug (#1907)
      • It would emit code for destructors of temporaries in an unevaluated context
    • Improved detection of stdlib's support for std::uncaught_exceptions (#1911)
    Source code(tar.gz)
    Source code(zip)
    catch.hpp(629.53 KB)
    catch.hpp.asc(819 bytes)
    catch_reporter_automake.hpp(2.21 KB)
    catch_reporter_automake.hpp.asc(819 bytes)
    catch_reporter_sonarqube.hpp(7.09 KB)
    catch_reporter_sonarqube.hpp.asc(819 bytes)
    catch_reporter_tap.hpp(9.60 KB)
    catch_reporter_tap.hpp.asc(819 bytes)
    catch_reporter_teamcity.hpp(8.70 KB)
    catch_reporter_teamcity.hpp.asc(819 bytes)
  • v2.11.2(Mar 19, 2020)

    Improvements

    • GCC and Clang now issue warnings for suspicious code in assertions (#1880)
      • E.g. REQUIRE( int != unsigned int ) will now issue mixed signedness comparison warning
      • This has always worked on MSVC, but it now also works for GCC and current Clang versions
    • Colorization of "Test filters" output should be more robust now
    • --wait-for-keypress now also accepts never as an option (#1866)
    • Reporters no longer round-off nanoseconds when reporting benchmarking results (#1876)
    • Catch2's debug break now supports iOS while using Thumb instruction set (#1862)
    • It is now possible to customize benchmark's warm-up time when running the test binary (#1844)
      • --benchmark-warmup-time {ms}
    • User can now specify how Catch2 should break into debugger (#1846)

    Fixes

    • Fixes missing <random> include in benchmarking (#1831)
    • Fixed missing <iterator> include in benchmarking (#1874)
    • Hidden test cases are now also tagged with [!hide] as per documentation (#1847)
    • Detection of whether libc provides std::nextafter has been improved (#1854)
    • Detection of wmain no longer incorrectly looks for WIN32 macro (#1849)
      • Now it just detects Windows platform
    • Composing already-composed matchers no longer modifies the partially-composed matcher expression
      • This bug has been present for the last ~2 years and nobody reported it
    Source code(tar.gz)
    Source code(zip)
    catch.hpp(625.96 KB)
    catch.hpp.asc(819 bytes)
    catch_reporter_automake.hpp(2.21 KB)
    catch_reporter_automake.hpp.asc(819 bytes)
    catch_reporter_sonarqube.hpp(7.09 KB)
    catch_reporter_sonarqube.hpp.asc(819 bytes)
    catch_reporter_tap.hpp(9.60 KB)
    catch_reporter_tap.hpp.asc(819 bytes)
    catch_reporter_teamcity.hpp(8.70 KB)
    catch_reporter_teamcity.hpp.asc(819 bytes)
  • v2.11.1(Dec 28, 2019)

    Improvements

    • Breaking into debugger is supported on iOS (#1817)
    • google-build-using-namespace clang-tidy warning is suppressed (#1799)

    Fixes

    • Clang on Windows is no longer assumed to implement MSVC's traditional preprocessor (#1806)
    • ObjectStorage now behaves properly in const contexts (#1820)
    • GENERATE_COPY(a, b) now compiles properly (#1809, #1815)
    • Some more cleanups in the benchmarking support
    Source code(tar.gz)
    Source code(zip)
    catch.hpp(625.26 KB)
    catch.hpp.asc(819 bytes)
    catch_reporter_automake.hpp(2.21 KB)
    catch_reporter_automake.hpp.asc(819 bytes)
    catch_reporter_sonarqube.hpp(7.09 KB)
    catch_reporter_sonarqube.hpp.asc(819 bytes)
    catch_reporter_tap.hpp(9.60 KB)
    catch_reporter_tap.hpp.asc(819 bytes)
    catch_reporter_teamcity.hpp(8.70 KB)
    catch_reporter_teamcity.hpp.asc(819 bytes)
  • v3.0.0-preview1(Dec 28, 2019)

    This is a preview release for the changes in the next (v3) major version. The biggest change is that Catch2 is now primarily provided as a static library. Use Catch2Main or Catch2 CMake targets to link against it.

    (Potentially) Breaking changes

    • ANON_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)
      • You should use verbosity-modifiers for --list-tests instead
    • --list* commands are now piped through the reporters
      • The top-level reporter interface provides default implementation that works just as the old one
      • XmlReporter outputs a machine-parseable XML
    • TEST_CASE description support has been removed
      • If the second argument has text outside tags, the text will be ignored.
    • Hidden test cases are no longer included just because they don't match an exclusion tag
      • Previously, a TEST_CASE("A", "[.foo]") would be included by asking for ~[bar].
    • PredicateMatcher is no longer type erased.
      • This means that the type of the provided predicate is part of the PredicateMatcher's type
    • SectionInfo no longer contains section description as a member (#1319)
      • You can still write SECTION("ShortName", "Long and wordy description"), but the description is thrown away
      • The description type now must be a const char* or implicitly convertible to it

    Fixes

    • The INFO macro no longer contains superfluous semicolon (#1456)
    • The --list* family of command line flags now return 0 on success (#1410, #1146)
    Source code(tar.gz)
    Source code(zip)
  • v2.11.0(Nov 15, 2019)

    Improvements

    • JUnit reporter output now contains more details in case of failure (#1347, #1719)
    • Added SonarQube Test Data reporter (#1738)
      • It is in a separate header, just like the TAP, Automake, and TeamCity reporters
    • range generator now allows floating point numbers (#1776)
    • Reworked part of internals to increase throughput

    Fixes

    • The single header version should contain full benchmarking support (#1800)
    • [.foo] is now properly parsed as [.][foo] when used on the command line (#1798)
    • Fixed compilation of benchmarking on platforms where steady_clock::period is not std::nano (#1794)
    Source code(tar.gz)
    Source code(zip)
    catch.hpp(624.34 KB)
    catch.hpp.asc(833 bytes)
    catch_reporter_automake.hpp(2.15 KB)
    catch_reporter_automake.hpp.asc(833 bytes)
    catch_reporter_sonarqube.hpp(6.92 KB)
    catch_reporter_sonarqube.hpp.asc(833 bytes)
    catch_reporter_tap.hpp(9.35 KB)
    catch_reporter_tap.hpp.asc(833 bytes)
    catch_reporter_teamcity.hpp(8.48 KB)
    catch_reporter_teamcity.hpp.asc(833 bytes)
  • v2.10.2(Oct 24, 2019)

    Improvements

    • Catch2 will now compile on platform where INFINITY is double (#1782)

    Fixes

    • Warning suppressed during listener registration will no longer leak

    Miscellaneous

    • From this release forward released headers could be signed also by
      • KeyID 81E7 0B71 7FFB 27AF DB45 F520 90BB FF12 0F9C 087B
    Source code(tar.gz)
    Source code(zip)
    catch.hpp(619.51 KB)
    catch.hpp.asc(833 bytes)
    catch_reporter_automake.hpp(2.15 KB)
    catch_reporter_automake.hpp.asc(833 bytes)
    catch_reporter_tap.hpp(9.35 KB)
    catch_reporter_tap.hpp.asc(833 bytes)
    catch_reporter_teamcity.hpp(8.48 KB)
    catch_reporter_teamcity.hpp.asc(833 bytes)
  • v2.10.1(Oct 20, 2019)

    Improvements

    • Catch2 now guards itself against min and max macros from windows.h (#1772)
    • Templated tests will now compile with ICC (#1748)
    • WithinULP matcher now uses scientific notation for stringification (#1760)

    Fixes

    • Templated tests no longer trigger -Wunused-templates (#1762)
    • Suppressed clang-analyzer false positive in context getter (#1230, #1735)

    Miscellaneous

    • CMake no longer prohibits in-tree build when Catch2 is used as a subproject (#1773, #1774)
    Source code(tar.gz)
    Source code(zip)
    catch.hpp(619.39 KB)
    catch.hpp.asc(819 bytes)
    catch_reporter_automake.hpp(2.21 KB)
    catch_reporter_automake.hpp.asc(819 bytes)
    catch_reporter_tap.hpp(9.60 KB)
    catch_reporter_tap.hpp.asc(819 bytes)
    catch_reporter_teamcity.hpp(8.70 KB)
    catch_reporter_teamcity.hpp.asc(819 bytes)
  • v2.10.0(Oct 13, 2019)

    Fixes

    • TEMPLATE_LIST_TEST_CASE now properly handles non-copyable and non-movable types (#1729)
    • Fixed compilation error on Solaris caused by a system header defining macro TT (#1722, #1723)
    • REGISTER_ENUM will now fail at compilation time if the registered enum is too large
    • Removed use of std::is_same_v in C++17 mode (#1757)
    • Fixed parsing of escaped special characters when reading test specs from a file (#1767, #1769)

    Improvements

    • Trailing and leading whitespace in test/section specs are now ignored.
    • Writing to Android debug log now uses __android_log_write instead of __android_log_print
    • Android logging support can now be turned on/off at compile time (#1743)
      • The toggle is CATCH_CONFIG_ANDROID_LOGWRITE
    • Added a generator that returns elements of a range
      • Use via from_range(from, to) or from_range(container)
    • Added support for CRTs that do not provide std::nextafter (#1739)
      • They must still provide global nextafter{f,l,}
      • Enabled via CATCH_CONFIG_GLOBAL_NEXTAFTER
    • Special cased Approx(inf) not to match non-infinite values
      • Very strictly speaking this might be a breaking change, but it should match user expectations better
    • The output of benchmarking through the Console reporter when --benchmark-no-analysis is set is now much simpler (#1768)
    • Added a matcher that can be used for checking an exceptions message (#1649, #1728)
      • The matcher helper function is called Message
      • The exception must publicly derive from std::exception
      • The matching is done exactly, including case and whitespace
    • Added a matcher that can be used for checking relative equality of floating point numbers (#1746)
      • Unlike Approx, it considers both sides when determining the allowed margin
      • Special cases NaN and INFINITY to match user expectations
      • The matcher helper function is called WithinRel
    • The ULP matcher now allows for any possible distance between the two numbers
    • The random number generators now use Catch-global instance of RNG (#1734, #1736)
      • This means that nested random number generators actually generate different numbers

    Miscellaneous

    • In-repo PNGs have been optimized to lower overhead of using Catch2 via git clone
    • Catch2 now uses its own implementation of the URBG concept
      • In the future we also plan to use our own implementation of the distributions from <random> to provide cross-platform repeatability of random results
    Source code(tar.gz)
    Source code(zip)
    catch.hpp(614.85 KB)
    catch.hpp.asc(819 bytes)
    catch_reporter_automake.hpp(2.21 KB)
    catch_reporter_automake.hpp.asc(819 bytes)
    catch_reporter_tap.hpp(9.60 KB)
    catch_reporter_tap.hpp.asc(819 bytes)
    catch_reporter_teamcity.hpp(8.70 KB)
    catch_reporter_teamcity.hpp.asc(819 bytes)
  • v2.9.2(Aug 8, 2019)

    Fixes

    • ChunkGenerator can now be used with chunks of size 0 (#1671)
    • Nested subsections are now run properly when specific section is run via the -c argument (#1670, #1673)
    • Catch2 now consistently uses _WIN32 to detect Windows platform (#1676)
    • TEMPLATE_LIST_TEST_CASE now support non-default constructible type lists (#1697)
    • Fixed a crash in the XMLReporter when a benchmark throws exception during warmup (#1706)
    • Fixed a possible infinite loop in CompactReporter (#1715)
    • Fixed -w NoTests returning 0 even when no tests were matched (#1449, #1683, #1684)
    • Fixed matcher compilation under Obj-C++ (#1661)

    Improvements

    • RepeatGenerator and FixedValuesGenerator now fail to compile when used with bool (#1692)
      • Previously they would fail at runtime.
    • Catch2 now supports Android's debug logging for its debug output (#1710)
    • Catch2 now detects and configures itself for the RTX platform (#1693)
      • You still need to pass --benchmark-no-analysis if you are using benchmarking under RTX
    • Removed a "storage class is not first" warning when compiling Catch2 with PGI compiler (#1717)

    Miscellaneous

    • Documentation now contains indication when a specific feature was introduced (#1695)
      • These start with Catch2 v2.3.0, (a bit over a year ago).
      • docs/contributing.md has been updated to provide contributors guidance on how to add these to newly written documentation
    • Various other documentation improvements
      • ToC fixes
      • Documented --order and --rng-seed command line options
      • Benchmarking documentation now clearly states that it requires opt-in
      • Documented CATCH_CONFIG_CPP17_OPTIONAL and CATCH_CONFIG_CPP17_BYTE macros
      • Properly documented built-in vector matchers
      • Improved *_THROWS_MATCHES documentation a bit
    • CMake config file is now arch-independent even if CMAKE_SIZEOF_VOID_P is in CMake cache (#1660)
    • CatchAddTests now properly escapes [ and ] in test names (#1634, #1698)
    • Reverted CatchAddTests adding tags as CTest labels (#1658)
      • The script broke when test names were too long
      • Overwriting LABELS caused trouble for users who set them manually
      • CMake does not let users append to LABELS if the test name has spaces
    Source code(tar.gz)
    Source code(zip)
    catch.hpp(604.59 KB)
    catch.hpp.asc(819 bytes)
    catch_reporter_automake.hpp(2.21 KB)
    catch_reporter_automake.hpp.asc(819 bytes)
    catch_reporter_tap.hpp(9.60 KB)
    catch_reporter_tap.hpp.asc(819 bytes)
    catch_reporter_teamcity.hpp(8.74 KB)
    catch_reporter_teamcity.hpp.asc(819 bytes)
Owner
Catch Org
Organisation account for Catch repositories
Catch Org
🧪 single header unit testing framework for C and C++

?? utest.h A simple one header solution to unit testing for C/C++. Usage Just #include "utest.h" in your code! The current supported platforms are Lin

Neil Henning 499 Aug 5, 2022
CppUTest unit testing and mocking framework for C/C++

CppUTest CppUTest unit testing and mocking framework for C/C++ More information on the project page Slack channel: Join if link not expired Getting St

CppUTest 1.1k Aug 8, 2022
A unit testing framework for C

Check Table of Contents About Installing Linking Packaging About Check is a unit testing framework for C. It features a simple interface for defining

null 892 Jul 28, 2022
Minimal unit testing framework for C

MinUnit Minunit is a minimal unit testing framework for C/C++ self-contained in a single header file. It provides a way to define and configure test s

David Siñuela Pastor 428 Jul 29, 2022
A lightweight unit testing framework for C++

Maintenance of UnitTest++, recently sporadic, is officially on hiatus until 26 November 2020. Subscribe to https://github.com/unittest-cpp/unittest-cp

UnitTest++ 503 Aug 5, 2022
UT: C++20 μ(micro)/Unit Testing Framework

"If you liked it then you "should have put a"_test on it", Beyonce rule [Boost::ext].UT / μt | Motivation | Quick Start | Overview | Tutorial | Exampl

boost::ext 888 Aug 7, 2022
Palanteer is a set of high performance visual profiler, debugger, tests enabler for C++ and Python

Palanteer is a set of lean and efficient tools to improve the general software quality, for C++ and Python programs.

Damien Feneyrou 1.9k Aug 2, 2022
Write tests in C

NAME libtap - Write tests in C SYNOPSIS #include <tap.h> int main () { plan(5); int bronze = 1, silver = 2, gold = 3; ok(bronze < silver,

Jacob Gelbman 222 Jun 10, 2022
Execute Input/Output tests on a software

IO-Tester The goal of this software is to take files as parameter that contains lists of inputs and expected ouputs and to tell the user if the tests

Martin 32 Jul 18, 2022
A testing micro framework for creating function test doubles

Fake Function Framework (fff) A Fake Function Framework for C Hello Fake World! Capturing Arguments Return Values Resetting a Fake Call History Defaul

Mike Long 499 Aug 3, 2022
test framework

Photesthesis This is a small, experimental parameterized-testing tool. It is intended to be used in concert with another unit-testing framework (eg. C

Graydon Hoare 11 Jun 2, 2021
DotX64Dbg aims to provide a seamless way to write and test plugins for X64Dbg using .Net 5.0 and C#.

DotX64Dbg (EARLY ALPHA) Plugins and Scripting with C# for x64Dbg. Create Plugins for X64Dbg with ease DotX64Dbg aims to provide a seamless way to writ

ζeh Matt 7 Jan 21, 2022
Simple Unit Testing for C

Unity Test Copyright (c) 2007 - 2021 Unity Project by Mike Karlesky, Mark VanderVoord, and Greg Williams Welcome to the Unity Test Project, one of the

Throw The Switch 2.6k Aug 1, 2022
Implementations of FizzBuzz test, with different optimisations

fizzbuzz Optimisation of classic FizzBuzz test. supernaive The least efficient implementation, with 3 ifs and two printfs per number. It is so ineffic

Ilya Caramishev 117 Jul 17, 2022
The fastest feature-rich C++11/14/17/20 single-header testing framework

master branch Windows All dev branch Windows All doctest is a new C++ testing framework but is by far the fastest both in compile times (by orders of

Viktor Kirilov 4.1k Jul 28, 2022
Windows-only Remote Access Tool (RAT) with anti-debugging and anti-sandbox checks

RATwurst Windows-only Remote Access Tool (RAT) with anti-debugging and anti-sandbox checks. For educational purposes only. The reason behind this proj

AccidentalRebel 28 Jul 24, 2022
🍦IceCream-Cpp is a little (single header) library to help with the print debugging on C++11 and forward.

??IceCream-Cpp is a little (single header) library to help with the print debugging on C++11 and forward.

Renato Garcia 388 Aug 2, 2022
Googletest - Google Testing and Mocking Framework

GoogleTest OSS Builds Status Announcements Release 1.10.x Release 1.10.x is now available. Coming Soon Post 1.10.x googletest will follow Abseil Live

Google 27.1k Jul 31, 2022
C++ Benchmark Authoring Library/Framework

Celero C++ Benchmarking Library Copyright 2017-2019 John Farrier Apache 2.0 License Community Support A Special Thanks to the following corporations f

John Farrier 710 Jul 23, 2022