Mixing Tests and Production Code With Doctest
doctest is a fully open source light and feature-rich C++98 / C++11 single-header testing framework for unit tests and TDD. It 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. This is not possible (or at least practical) with any other testing framework for C++.