doctest

Single-header C++ testing framework supporting C++11/14/17/20/23

brewmacoslinux
Try with needOr install directly
Source

About

Feature-rich C++11/14/17/20/23 single-header testing framework

Commands

doctest

Examples

Create a simple test file and run tests$ cat > tests.cpp << 'EOF' #include "doctest.h" TEST_CASE("basic math") { CHECK(1 + 1 == 2); } EOF g++ tests.cpp -o tests && ./tests
Run tests with verbose output$ ./tests -v
Run specific test cases matching a pattern$ ./tests "*math*"