mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
Fix for GitHub issue #56
TEST_CASE_METHOD's put the generated class into the anonymous namespace
This commit is contained in:
parent
f51d316dba
commit
d207cecade
@ -139,11 +139,12 @@ private:
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
#define TEST_CASE_METHOD( ClassName, TestName, Desc )\
|
#define TEST_CASE_METHOD( ClassName, TestName, Desc )\
|
||||||
struct INTERNAL_CATCH_UNIQUE_NAME( Catch_FixtureWrapper ) : ClassName \
|
namespace{ \
|
||||||
{ \
|
struct INTERNAL_CATCH_UNIQUE_NAME( Catch_FixtureWrapper ) : ClassName{ \
|
||||||
void test(); \
|
void test(); \
|
||||||
}; \
|
}; \
|
||||||
namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar ) ( &INTERNAL_CATCH_UNIQUE_NAME( Catch_FixtureWrapper )::test, TestName, Desc, __FILE__, __LINE__ ); } \
|
Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar ) ( &INTERNAL_CATCH_UNIQUE_NAME( Catch_FixtureWrapper )::test, TestName, Desc, __FILE__, __LINE__ ); \
|
||||||
|
} \
|
||||||
void INTERNAL_CATCH_UNIQUE_NAME( Catch_FixtureWrapper )::test()
|
void INTERNAL_CATCH_UNIQUE_NAME( Catch_FixtureWrapper )::test()
|
||||||
|
|
||||||
#endif // TWOBLUECUBES_CATCH_REGISTRY_HPP_INCLUDED
|
#endif // TWOBLUECUBES_CATCH_REGISTRY_HPP_INCLUDED
|
||||||
|
Loading…
Reference in New Issue
Block a user