mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-21 03:55:39 +02:00
Add partial implementation of CATCH_CONFIG_DISABLE
* Assertions are defined into (void)(0) no-op * SECTIONs are defined away (leaving {} as scope) * TEST_CASEs and TEST_CASE_METHODs are not registered. * REGISTER_TEST_CASE is defined into (void)(0) no-op * METHOD_AS_TEST_CASE is defined away
This commit is contained in:
@@ -47,6 +47,19 @@ struct AutoReg : NonCopyable {
|
||||
|
||||
} // end namespace Catch
|
||||
|
||||
#if defined(CATCH_CONFIG_DISABLE)
|
||||
#define INTERNAL_CATCH_TESTCASE_NO_REGISTRATION( TestName, ... ) \
|
||||
static void TestName()
|
||||
#define INTERNAL_CATCH_TESTCASE_METHOD_NO_REGISTRATION( TestName, ClassName, ... ) \
|
||||
namespace{ \
|
||||
struct TestName : ClassName { \
|
||||
void test(); \
|
||||
}; \
|
||||
} \
|
||||
void TestName::test()
|
||||
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#define INTERNAL_CATCH_TESTCASE2( TestName, ... ) \
|
||||
static void TestName(); \
|
||||
|
Reference in New Issue
Block a user