mirror of
https://github.com/unittest-cpp/unittest-cpp
synced 2026-09-26 16:19:30 +03:00
cleaned macro
This commit is contained in:
parent
a5d13e3aa8
commit
1ccb2136d3
1 changed files with 8 additions and 8 deletions
|
|
@ -5,21 +5,21 @@
|
|||
|
||||
|
||||
#define SET_SUITE_PARAMETERS(Type, Name, SetUpBody) \
|
||||
class ParameterizedCreator ## Name \
|
||||
class ParameterizedCreator##Name \
|
||||
{ \
|
||||
public: \
|
||||
ParameterizedCreator ## Name() : globalInstance(getGlobalInstance()) {} \
|
||||
UnitTest::ParameterizedTest<## Type> & globalInstance; \
|
||||
ParameterizedCreator##Name() : globalInstance(getGlobalInstance()) {} \
|
||||
UnitTest::ParameterizedTest<Type> & globalInstance; \
|
||||
private: \
|
||||
static UnitTest::ParameterizedTest<## Type> & getGlobalInstance() \
|
||||
static UnitTest::ParameterizedTest<Type> & getGlobalInstance() \
|
||||
{ \
|
||||
static UnitTest::ParameterizedTest<## Type> instance(#Name, create()); \
|
||||
static UnitTest::ParameterizedTest<Type> instance(#Name, create()); \
|
||||
return instance; \
|
||||
} \
|
||||
static vector<## Type> create() { vector<## Type> parameters; SetUpBody return parameters; } \
|
||||
} static parameterizedCreator ## Name ## Instance; \
|
||||
static vector<Type> create() { vector<Type> parameters; SetUpBody return parameters; } \
|
||||
} static parameterizedCreator##Name##Instance; \
|
||||
\
|
||||
static UnitTest::ParameterizedTest<## Type> & ## Name(parameterizedCreator ## Name ## Instance.globalInstance)
|
||||
static UnitTest::ParameterizedTest<Type> & Name(parameterizedCreator##Name##Instance.globalInstance)
|
||||
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue