toc
The doctest test framework works well with Approval Tests.
include: include_ninja_warning_note
Doctest is similar to Catch, but claims to give faster compilation times.
Approval Tests for doctest requires that a file called the following is found:
snippet: required_header_for_doctest
Approval Tests needs doctest version 2.3.4 or above.
Create a file main.cpp
and add just the following two lines:
snippet: doctest_main
If you have supplied your own main()
for doctest, you will need to teach it how to supply test names to Approval Tests.
You should make the following additions to your own source file that contains main()
.
snippet: doctest_existing_main