created macro SET_SUITE_PARAMETERS

This commit is contained in:
Gabriel Schlozer 2016-05-13 22:10:40 +02:00
parent a6c56fe54b
commit ab3cc22e57
2 changed files with 23 additions and 0 deletions

View file

@ -0,0 +1,22 @@
#ifndef UNITTEST_PARAMETERIZEDMACROS_H
#define UNITTEST_PARAMETERIZEDMACROS_H
#include "ParameterizedSuite.h"
#define SET_SUITE_PARAMETERS(Name, Type) \
class ParameterizedCreator ## Name\
{ \
friend class ParameterizedSuite<## Type>; \
public: \
ParameterizedCreator ## Name() { create(); } \
vector<## Type> parameters; \
private: \
void create(); \
} parameterizedCreator ## Name ## Instance; \
\
ParameterizedSuite<##Type> ## Name(UnitTestSuite::GetSuiteName(), parameterizedCreator ## Name ## Instance.parameters); \
\
void ParameterizedCreator ## Name::create()
#endif

View file

@ -8,5 +8,6 @@
#include "TestRunner.h"
#include "TimeConstraint.h"
#include "ReportAssert.h"
#include "ParameterizedMacros.h"
#endif