I basically need a mix of BOOST_FIXTURE_TEST_CASE_TEMPLATE and BOOST_DATA_TEST_CASE_WITH_PARAMS.
I need to write a test that uses a type and a string parameter different for each type. Let’s say the inputs for my test whould be for example:
typedef boost::mpl::list< A1, A2> types;
std::array< std::string, 2 > const StringArray = { "textA1", "textA2" };
BOOST_FIXTURE_SOMETHIG(TestName, Fixture, T, types, StringArray , text) {
... hete I use both T and text ...
}
For each occurrence of the test the i-th element of types and i-th element of StringArray are used. It is not necessary to have different/arrays as inputs, and a way to use one of the existing Boost Test macro is fine, but I didn’t find a way.
Maybe the first example described here: https://live.boost.org/doc/libs/1_81_0/libs/test/doc/html/boost_test/tests_organization/test_cases/test_organization_templates.html
is exactly what I’m looking for (adding a string parameter to single_test()), but it seems having “several problems/inconveniences”.
So, what can I do?