Familiar tests
Assertions, sections, reporters, benchmarks and the command line keep working through the Catch2-compatible surface.
Progmasoft Catch3
Catch3 keeps the expressive test-writing model of Catch2 and adds a C++17 library of its own: native property testing, snapshots and structured results.
Catch3 is independently maintained. It is not an official Catch2 release and is not endorsed by Catch2's maintainers.
A first property
#include <Progmasoft/Catch3.hpp>
using namespace Progmasoft::Catch3;
TEST_CASE( "reversing twice gives the original", "[property]" ) {
CATCH3_CHECK_FOR_ALL(
Gen::Vectors( Gen::Integers<int>() ),
[]( const std::vector<int>& values ) {
auto copy = values;
std::reverse( copy.begin(), copy.end() );
std::reverse( copy.begin(), copy.end() );
return copy == values;
} );
}Assertions, sections, reporters, benchmarks and the command line keep working through the Catch2-compatible surface.
Inputs shrink through their recorded choices, so a smaller counterexample still satisfies every filter and dependency.
An example database replays failures first on the next run, on every machine that shares it, until they are fixed.
Equivalent, Metamorphic, RoundTrip and Idempotent check properties that need no expected result, and state machines test stateful code.
Target scores guide the search towards rare inputs, and Cover fails a property that reaches an interesting case too rarely.
Text snapshots with explicit files, and a structured result model written as JUnit-style XML.