
"Ed Johnson"
Gennadiy Rozental wrote:
BOOST_FIXTURE_TEST_CASE is a macro. I am not sure what you are trying to do by declaring it a friend? I want to be able to test private members of my classes while using the Auto Test framework. I won't test private data that often, so it's not that big a deal to use the BOOST_AUTO_TEST_CASE for those occasions.
Let me repeat. *BOOST_FIXTURE_TEST_CASE is a macro*. Declaring it as a friend doesn't help you in any way.
Gennadiy
I'm comfortable with the fact that BOOST_FIXTURE_TEST_CASE will not work with friend.
However, isn't BOOST_AUTO_TEST_CASE also a macro? We both agreed in this thread that BOOST_AUTO_TEST_CASE worked as a friend function, right?
No. We did not. BOOST_AUTO_TEST_CASE is a macro also. And whatever you do defining macro as a friend wont help you. I am bit confused that I need to explain this. What do you expect to achieve by defining macro as a friend? It's just invalid C++. (Well not exactly, but that is definitely not what you expect it to be) Gennadiy