boostorg / test

The reference C++ unit testing framework (TDD, xUnit, C++03/11/14/17)
http://boost.org/libs/test
Boost Software License 1.0
183 stars 140 forks source link

BOOST_DATA_TEST_CASE doesn't compile when a variable `t` is present #388

Open circuitPolys opened 1 year ago

circuitPolys commented 1 year ago

For a minimal working example, consider the first BOOST_DATA_TEST_CASE example that appears in the "Operations on datasets" page of the documentation. This example will not compile if the variable var is renamed to t. It seems that only t is affected, because the example compiles fine if t is replaced by any other letter.

I have asked about this on StackOverflow where the user "sehe" identified what is causing the errors: there is a line test1case t; in the expansion of the macro which is creating a conflict.