Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPhil Nash2011-12-28 19:55:11 +0000
committerPhil Nash2011-12-28 19:55:11 +0000
commitd207cecade008b0a41da5d459ea8f38c8f75496a (patch)
tree38d39953c45a9219710b2c0ee17242e977bc8c46
parentf51d316dbacbf8eb2d2f6a4e53ec92af38bcf761 (diff)
downloadcatch3-d207cecade008b0a41da5d459ea8f38c8f75496a.tar.gz
Fix for GitHub issue #56
TEST_CASE_METHOD's put the generated class into the anonymous namespace
-rw-r--r--include/internal/catch_test_registry.hpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/internal/catch_test_registry.hpp b/include/internal/catch_test_registry.hpp
index 7f090538..d2160dd1 100644
--- a/include/internal/catch_test_registry.hpp
+++ b/include/internal/catch_test_registry.hpp
@@ -139,11 +139,12 @@ private:
///////////////////////////////////////////////////////////////////////////////
#define TEST_CASE_METHOD( ClassName, TestName, Desc )\
- struct INTERNAL_CATCH_UNIQUE_NAME( Catch_FixtureWrapper ) : ClassName \
- { \
- void test(); \
- }; \
- namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar ) ( &INTERNAL_CATCH_UNIQUE_NAME( Catch_FixtureWrapper )::test, TestName, Desc, __FILE__, __LINE__ ); } \
+ namespace{ \
+ struct INTERNAL_CATCH_UNIQUE_NAME( Catch_FixtureWrapper ) : ClassName{ \
+ void test(); \
+ }; \
+ 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()
#endif // TWOBLUECUBES_CATCH_REGISTRY_HPP_INCLUDED