Closed claremacrae closed 3 years ago
It turns out that values can be combined in INFO
statements using ,
- so the +
is not needed.
See the docs
However, changing the test to separate values with a ,
causes the build to fail with doctest 2.4.1:
[ 59%] Building CXX object tests/DocTest_Tests/CMakeFiles/DocTest_Tests.dir/reporters/ReporterFactoryTests.cpp.o
/Users/clare/Documents/develop/ApprovalTests/ApprovalTests.cpp/tests/DocTest_Tests/reporters/ReporterFactoryTests.cpp:38:47: error: too many arguments provided to function-like macro invocation
INFO(std::string("Reporter name = "), reporterName);
^
/Users/clare/Documents/develop/ApprovalTests/ApprovalTests.cpp/third_party/doctest/include/doctest/doctest.2.3.7.h:1935:9: note: macro 'DOCTEST_INFO' defined here
#define DOCTEST_INFO(expression) \
^
/Users/clare/Documents/develop/ApprovalTests/ApprovalTests.cpp/tests/DocTest_Tests/reporters/ReporterFactoryTests.cpp:38:9: error: use of undeclared identifier 'DOCTEST_INFO'
INFO(std::string("Reporter name = "), reporterName);
^
/Users/clare/Documents/develop/ApprovalTests/ApprovalTests.cpp/third_party/doctest/include/doctest/doctest.2.3.7.h:2454:14: note: expanded from macro 'INFO'
#define INFO DOCTEST_INFO
^
2 errors generated.
make[3]: *** [tests/DocTest_Tests/CMakeFiles/DocTest_Tests.dir/reporters/ReporterFactoryTests.cpp.o] Error 1
We bundle doctest 2.4.1, which works fine.
However a change in doctest 2.4.2 results in this error message: