Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
catch_test_registry.h File Reference
Include dependency graph for catch_test_registry.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Catch::TestInvokerAsMethod< C >
 
struct  Catch::NameAndTags
 
struct  Catch::AutoReg
 

Namespaces

namespace  Catch
 

Macros

#define INTERNAL_CATCH_TESTCASE2(TestName, ...)
 
#define INTERNAL_CATCH_TESTCASE(...)
 
#define INTERNAL_CATCH_METHOD_AS_TEST_CASE(QualifiedMethod, ...)
 
#define INTERNAL_CATCH_TEST_CASE_METHOD2(TestName, ClassName, ...)
 
#define INTERNAL_CATCH_TEST_CASE_METHOD(ClassName, ...)
 
#define INTERNAL_CATCH_REGISTER_TESTCASE(Function, ...)
 
#define INTERNAL_CATCH_TEMPLATE_TEST_CASE_2(TestName, TestFunc, Name, Tags, ...)
 
#define CATCH_INTERNAL_CHECK_UNIQUE_TYPES(...)
 
#define INTERNAL_CATCH_TEMPLATE_TEST_CASE(Name, Tags, ...)
 
#define INTERNAL_CATCH_TEMPLATE_REGISTRY_INITIATE(TestName, Name, ...)
 
#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(TestName, TestFuncName, Name, Tags, TmplTypes, TypesList)
 
#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE(Name, Tags, ...)
 
#define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2(TestNameClass, TestName, ClassName, Name, Tags, ...)
 
#define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD(ClassName, Name, Tags, ...)
 
#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2(TestNameClass, TestName, ClassName, Name, Tags, TmplTypes, TypesList)
 
#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD(ClassName, Name, Tags, ...)
 

Functions

auto Catch::makeTestInvoker (void(*testAsFunction)()) noexcept -> ITestInvoker *
 
template<typename C >
auto Catch::makeTestInvoker (void(C::*testAsMethod)()) noexcept -> ITestInvoker *
 

Macro Definition Documentation

◆ CATCH_INTERNAL_CHECK_UNIQUE_TYPES

#define CATCH_INTERNAL_CHECK_UNIQUE_TYPES ( ...)
Value:
static_assert(Catch::is_unique<__VA_ARGS__>::value,"Duplicate type detected in declaration of template test case");

Definition at line 137 of file catch_test_registry.h.

◆ INTERNAL_CATCH_METHOD_AS_TEST_CASE

#define INTERNAL_CATCH_METHOD_AS_TEST_CASE ( QualifiedMethod,
... )
Value:
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &QualifiedMethod ), CATCH_INTERNAL_LINEINFO, "&" #QualifiedMethod, Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \
#define CATCH_INTERNAL_LINEINFO
#define INTERNAL_CATCH_UNIQUE_NAME(name)
#define CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS
auto makeTestInvoker(void(*testAsFunction)()) noexcept -> ITestInvoker *

Definition at line 88 of file catch_test_registry.h.

88 #define INTERNAL_CATCH_METHOD_AS_TEST_CASE( QualifiedMethod, ... ) \
89 CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
90 namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &QualifiedMethod ), CATCH_INTERNAL_LINEINFO, "&" #QualifiedMethod, Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \
91 CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS

◆ INTERNAL_CATCH_REGISTER_TESTCASE

#define INTERNAL_CATCH_REGISTER_TESTCASE ( Function,
... )
Value:
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( Function ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \

Definition at line 108 of file catch_test_registry.h.

108 #define INTERNAL_CATCH_REGISTER_TESTCASE( Function, ... ) \
109 CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
110 Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( Function ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \
111 CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS

◆ INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE

#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE ( Name,
Tags,
... )
Value:
INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ),Name,Tags,__VA_ARGS__)
#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(TestName, TestFuncName, Name, Tags, TmplTypes, TypesList)

Definition at line 182 of file catch_test_registry.h.

182 #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE(Name, Tags, ...)\
183 INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ),Name,Tags,__VA_ARGS__)

◆ INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2

#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2 ( TestName,
TestFuncName,
Name,
Tags,
TmplTypes,
TypesList )
Value:
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
template<typename TestType> static void TestFuncName(); \
namespace { \
template<typename... Types> \
struct TestName { \
TestName() { \
CATCH_INTERNAL_CHECK_UNIQUE_TYPES(Types...) \
int index = 0; \
using expander = int[]; \
constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes))};\
constexpr char const* types_list[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TypesList))};\
constexpr auto num_types = sizeof(types_list) / sizeof(types_list[0]);\
(void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFuncName<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index / num_types]) + "<" + std::string(types_list[index % num_types]) + ">", Tags } ), index++, 0)... };/* NOLINT */\
} \
}; \
static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){ \
using TestInit = Catch::combine<INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)> \
::with_types<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(TypesList)>::into<TestName>::type; \
TestInit(); \
return 0; \
}(); \
} \
CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
template<typename TestType> \
static void TestFuncName()
#define CATCH_REC_LIST(f,...)
#define INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(types)
#define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param)
#define INTERNAL_CATCH_REMOVE_PARENS(...)

Definition at line 154 of file catch_test_registry.h.

154 #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(TestName, TestFuncName, Name, Tags, TmplTypes, TypesList) \
155 CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
156 template<typename TestType> static void TestFuncName(); \
157 namespace { \
158 template<typename... Types> \
159 struct TestName { \
160 TestName() { \
161 CATCH_INTERNAL_CHECK_UNIQUE_TYPES(Types...) \
162 int index = 0; \
163 using expander = int[]; \
164 constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes))};\
165 constexpr char const* types_list[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TypesList))};\
166 constexpr auto num_types = sizeof(types_list) / sizeof(types_list[0]);\
167 (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFuncName<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index / num_types]) + "<" + std::string(types_list[index % num_types]) + ">", Tags } ), index++, 0)... };/* NOLINT */\
168 } \
169 }; \
170 static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){ \
171 using TestInit = Catch::combine<INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)> \
172 ::with_types<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(TypesList)>::into<TestName>::type; \
173 TestInit(); \
174 return 0; \
175 }(); \
176 } \
177 CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
178 template<typename TestType> \
179 static void TestFuncName()

◆ INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD

#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD ( ClassName,
Name,
Tags,
... )
Value:
INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, __VA_ARGS__ )
#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2(TestNameClass, TestName, ClassName, Name, Tags, TmplTypes, TypesList)

Definition at line 250 of file catch_test_registry.h.

250 #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( ClassName, Name, Tags, ... )\
251 INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, __VA_ARGS__ )

◆ INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2

#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2 ( TestNameClass,
TestName,
ClassName,
Name,
Tags,
TmplTypes,
TypesList )
Value:
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
template<typename TestType> \
struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName <TestType>) { \
void test();\
};\
namespace {\
template<typename...Types>\
struct TestNameClass{\
TestNameClass(){\
CATCH_INTERNAL_CHECK_UNIQUE_TYPES(Types...)\
int index = 0;\
using expander = int[];\
constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes))};\
constexpr char const* types_list[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TypesList))};\
constexpr auto num_types = sizeof(types_list) / sizeof(types_list[0]);\
(void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index / num_types]) + "<" + std::string(types_list[index % num_types]) + ">", Tags } ), index++, 0)... };/* NOLINT */ \
}\
};\
static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
using TestInit = Catch::combine<INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)>\
::with_types<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(TypesList)>::into<TestNameClass>::type;\
TestInit();\
return 0;\
}(); \
}\
CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
template<typename TestType> \
void TestName<TestType>::test()

Definition at line 219 of file catch_test_registry.h.

219 #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2(TestNameClass, TestName, ClassName, Name, Tags, TmplTypes, TypesList)\
220 CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
221 template<typename TestType> \
222 struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName <TestType>) { \
223 void test();\
224 };\
225 namespace {\
226 template<typename...Types>\
227 struct TestNameClass{\
228 TestNameClass(){\
229 CATCH_INTERNAL_CHECK_UNIQUE_TYPES(Types...)\
230 int index = 0;\
231 using expander = int[];\
232 constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes))};\
233 constexpr char const* types_list[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TypesList))};\
234 constexpr auto num_types = sizeof(types_list) / sizeof(types_list[0]);\
235 (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index / num_types]) + "<" + std::string(types_list[index % num_types]) + ">", Tags } ), index++, 0)... };/* NOLINT */ \
236 }\
237 };\
238 static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
239 using TestInit = Catch::combine<INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)>\
240 ::with_types<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(TypesList)>::into<TestNameClass>::type;\
241 TestInit();\
242 return 0;\
243 }(); \
244 }\
245 CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
246 template<typename TestType> \
247 void TestName<TestType>::test()

◆ INTERNAL_CATCH_TEMPLATE_REGISTRY_INITIATE

#define INTERNAL_CATCH_TEMPLATE_REGISTRY_INITIATE ( TestName,
Name,
... )
Value:
static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
TestName<CATCH_REC_LIST(INTERNAL_CATCH_REMOVE_PARENS, __VA_ARGS__)>(CATCH_REC_LIST_UD(INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME,Name, __VA_ARGS__));\
return 0;\
}();
#define INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME(Name,...)
#define CATCH_REC_LIST_UD(f, userdata,...)

Definition at line 148 of file catch_test_registry.h.

148 #define INTERNAL_CATCH_TEMPLATE_REGISTRY_INITIATE(TestName, Name, ...)\
149 static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
150 TestName<CATCH_REC_LIST(INTERNAL_CATCH_REMOVE_PARENS, __VA_ARGS__)>(CATCH_REC_LIST_UD(INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME,Name, __VA_ARGS__));\
151 return 0;\
152 }();

◆ INTERNAL_CATCH_TEMPLATE_TEST_CASE

#define INTERNAL_CATCH_TEMPLATE_TEST_CASE ( Name,
Tags,
... )
Value:
INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, __VA_ARGS__ )
#define INTERNAL_CATCH_TEMPLATE_TEST_CASE_2(TestName, TestFunc, Name, Tags,...)

Definition at line 141 of file catch_test_registry.h.

141 #define INTERNAL_CATCH_TEMPLATE_TEST_CASE(Name, Tags, ...) \
142 INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, __VA_ARGS__ )

◆ INTERNAL_CATCH_TEMPLATE_TEST_CASE_2

#define INTERNAL_CATCH_TEMPLATE_TEST_CASE_2 ( TestName,
TestFunc,
Name,
Tags,
... )
Value:
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
template<typename TestType> \
static void TestFunc();\
namespace {\
template<typename...Types> \
struct TestName{\
template<typename...Ts> \
TestName(Ts...names){\
CATCH_INTERNAL_CHECK_UNIQUE_TYPES(CATCH_REC_LIST(INTERNAL_CATCH_REMOVE_PARENS, __VA_ARGS__)) \
using expander = int[];\
(void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFunc<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ names, Tags } ), 0)... };/* NOLINT */ \
}\
};\
INTERNAL_CATCH_TEMPLATE_REGISTRY_INITIATE(TestName, Name, __VA_ARGS__) \
}\
CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
template<typename TestType> \
static void TestFunc()

Definition at line 114 of file catch_test_registry.h.

114 #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_2(TestName, TestFunc, Name, Tags, ... )\
115 CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
116 template<typename TestType> \
117 static void TestFunc();\
118 namespace {\
119 template<typename...Types> \
120 struct TestName{\
121 template<typename...Ts> \
122 TestName(Ts...names){\
123 CATCH_INTERNAL_CHECK_UNIQUE_TYPES(CATCH_REC_LIST(INTERNAL_CATCH_REMOVE_PARENS, __VA_ARGS__)) \
124 using expander = int[];\
125 (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFunc<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ names, Tags } ), 0)... };/* NOLINT */ \
126 }\
127 };\
128 INTERNAL_CATCH_TEMPLATE_REGISTRY_INITIATE(TestName, Name, __VA_ARGS__) \
129 }\
130 CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
131 template<typename TestType> \
132 static void TestFunc()

◆ INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD

#define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD ( ClassName,
Name,
Tags,
... )
Value:
INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, __VA_ARGS__ )
#define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2(TestNameClass, TestName, ClassName, Name, Tags,...)

Definition at line 212 of file catch_test_registry.h.

212 #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( ClassName, Name, Tags,... ) \
213 INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, __VA_ARGS__ )

◆ INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2

#define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2 ( TestNameClass,
TestName,
ClassName,
Name,
Tags,
... )
Value:
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
namespace{ \
template<typename TestType> \
struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName <TestType>) { \
void test();\
};\
template<typename...Types> \
struct TestNameClass{\
template<typename...Ts> \
TestNameClass(Ts...names){\
CATCH_INTERNAL_CHECK_UNIQUE_TYPES(CATCH_REC_LIST(INTERNAL_CATCH_REMOVE_PARENS, __VA_ARGS__)) \
using expander = int[];\
(void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ names, Tags } ), 0)... };/* NOLINT */ \
}\
};\
INTERNAL_CATCH_TEMPLATE_REGISTRY_INITIATE(TestNameClass, Name, __VA_ARGS__)\
}\
CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS\
template<typename TestType> \
void TestName<TestType>::test()

Definition at line 189 of file catch_test_registry.h.

189 #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( TestNameClass, TestName, ClassName, Name, Tags, ... ) \
190 CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
191 namespace{ \
192 template<typename TestType> \
193 struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName <TestType>) { \
194 void test();\
195 };\
196 template<typename...Types> \
197 struct TestNameClass{\
198 template<typename...Ts> \
199 TestNameClass(Ts...names){\
200 CATCH_INTERNAL_CHECK_UNIQUE_TYPES(CATCH_REC_LIST(INTERNAL_CATCH_REMOVE_PARENS, __VA_ARGS__)) \
201 using expander = int[];\
202 (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ names, Tags } ), 0)... };/* NOLINT */ \
203 }\
204 };\
205 INTERNAL_CATCH_TEMPLATE_REGISTRY_INITIATE(TestNameClass, Name, __VA_ARGS__)\
206 }\
207 CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS\
208 template<typename TestType> \
209 void TestName<TestType>::test()

◆ INTERNAL_CATCH_TEST_CASE_METHOD

#define INTERNAL_CATCH_TEST_CASE_METHOD ( ClassName,
... )
Value:
INTERNAL_CATCH_TEST_CASE_METHOD2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), ClassName, __VA_ARGS__ )
#define INTERNAL_CATCH_TEST_CASE_METHOD2(TestName, ClassName,...)

Definition at line 104 of file catch_test_registry.h.

104 #define INTERNAL_CATCH_TEST_CASE_METHOD( ClassName, ... ) \
105 INTERNAL_CATCH_TEST_CASE_METHOD2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), ClassName, __VA_ARGS__ )

◆ INTERNAL_CATCH_TEST_CASE_METHOD2

#define INTERNAL_CATCH_TEST_CASE_METHOD2 ( TestName,
ClassName,
... )
Value:
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
namespace{ \
struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName) { \
void test(); \
}; \
Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar ) ( Catch::makeTestInvoker( &TestName::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \
} \
CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
void TestName::test()

Definition at line 94 of file catch_test_registry.h.

94 #define INTERNAL_CATCH_TEST_CASE_METHOD2( TestName, ClassName, ... )\
95 CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
96 namespace{ \
97 struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName) { \
98 void test(); \
99 }; \
100 Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar ) ( Catch::makeTestInvoker( &TestName::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \
101 } \
102 CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
103 void TestName::test()

◆ INTERNAL_CATCH_TESTCASE

#define INTERNAL_CATCH_TESTCASE ( ...)
Value:
INTERNAL_CATCH_TESTCASE2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), __VA_ARGS__ )
#define INTERNAL_CATCH_TESTCASE2(TestName,...)

Definition at line 84 of file catch_test_registry.h.

84 #define INTERNAL_CATCH_TESTCASE( ... ) \
85 INTERNAL_CATCH_TESTCASE2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), __VA_ARGS__ )

◆ INTERNAL_CATCH_TESTCASE2

#define INTERNAL_CATCH_TESTCASE2 ( TestName,
... )
Value:
static void TestName(); \
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &TestName ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \
CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
static void TestName()

Definition at line 78 of file catch_test_registry.h.

78 #define INTERNAL_CATCH_TESTCASE2( TestName, ... ) \
79 static void TestName(); \
80 CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
81 namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &TestName ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \
82 CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
83 static void TestName()