the lightest and feature rich C++ single header testing framework

The doctest library is inspired by the unittest {} functionality of the D programming language and Python's docstrings - tests can be considered a form of documentation and should be able to reside near the production code which they test.

It is modeled after Catch (and lest) which is currently the most popular, simple and user friendly library out there.

Language Standard License Version Join the chat at https://gitter.im/onqtam/doctest

Build status

Servicebranch: masterbranch: dev
Travis-CI (Linux/OSX)Linux/OSX StatusLinux/OSX Status
Appveyor (Windows)Windows statusWindows status
Unit Test CoverageCoverage StatusCoverage Status
Static AnalysisStatic Analysis

Contributing

Donations would be appreciated very much since I quit my job to write open source software.

Donate to support

Contributions in the form of issues and pull requests are welcome as well.

For pull requests make sure the code is formatted with a recent-enough clang-format using the config file in the root of the repo (or I will format it after the merge) and that all the builds on travis and appveyor pass. Also before making a pull requrest you might want to make an issue about it for a discussion or join the chat on gitter.

This library has some design goals which must be kept. Make sure you have read the features and design goals page.

The master branch is the stable one with the latest release and the dev branch is on the bleeding edge.

Testing with compilers different from GCC/Clang/MSVC (and more platforms) is something the project would benefit from.