better registration macro
Brought to you by:
blep
The registration macro appends the current line number
to the token it generates. Unfortunately, this is not
unique across source files. I made a simple
modification (see below). It now prepends the test
class name to the token.
#define CPPUNIT_TEST_SUITE_REGISTRATION(
ATestFixtureType ) \
static CppUnit::AutoRegisterSuite< ATestFixtureType >
\
__CPPUNIT_MAKE_UNIQUE_NAME(ATestFixtureType##__autoRegisterSuite
)
Logged In: YES
user_id=196852
I don't understand the issue you have with the current
implementation: If the line number is included in the name
and there is only one test declaration per line, then it is
unique in the source file.
Could you explain what is the problem ?
Baptiste.