You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation of BOOST_TEST_GLOBAL_FIXTURE makes no mention of a restriction of the class names that can be passed. Passing a class name including the namespace leads to a compiler error though. The documentation should be adjusted to indicate this (or the macro adjusted, assuming this is even possible.)
namespace foo {
struct Bar {
}
}
BOOST_TEST_GLOBAL_FIXTURE(foo::Bar);
It's pretty simple to work around this issue, but the documentation should mention the restriction on the macro parameters.
Workaround for the above case:
namespace foo {
BOOST_TEST_GLOBAL_FIXTURE(Bar);
}
Alternatively a typedef/using could be used, but this could lead to name conflicts that are avoided by putting BOOST_TEST_GLOBAL_FIXTURE inside the namespace.
The text was updated successfully, but these errors were encountered:
The documentation of BOOST_TEST_GLOBAL_FIXTURE makes no mention of a restriction of the class names that can be passed. Passing a class name including the namespace leads to a compiler error though. The documentation should be adjusted to indicate this (or the macro adjusted, assuming this is even possible.)
Documentation document: https://github.com/boostorg/test/blob/develop/doc/test_organization/fixtures.qbk (Section "Global fixture")
Example of the issue
It's pretty simple to work around this issue, but the documentation should mention the restriction on the macro parameters.
Workaround for the above case:
Alternatively a typedef/using could be used, but this could lead to name conflicts that are avoided by putting
BOOST_TEST_GLOBAL_FIXTURE
inside the namespace.The text was updated successfully, but these errors were encountered: