cleaned macro

This commit is contained in:
Gabriel Schlozer 2016-07-01 16:54:19 +02:00
parent a5d13e3aa8
commit 1ccb2136d3

View file

@ -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