The Boost.Test test framework works well with Approval Tests.
Note: this document assumes the reader is familiar with the Boost.Test framework.
Approval Tests for Boost.Test requires that you specify the #include <.../unit_test.hpp>
This allows ApprovalTests to work with all the different configurations of boost.
Approval Tests needs Boost.Test version 1.60.0 or above.
To enable any Boost.Test test files to use ApprovalTests,
find the corresponding entry point and
add the following lines of code to your Test module's entry point
after the boost headers:
// test_entry_point.cpp file[s] (after #including boost.test)
#define APPROVALS_BOOSTTEST
#include "ApprovalTests.hpp"
A directory of Boost.Test source files can either have multiple or a single entry point[s]. The entry point is any file that will contain the line:
#define BOOST_TEST_MODULE ModuleName