15 #ifndef INCG_IRIS_IUTEST_FACTORY_HPP_9C2B4B94_95A0_479A_9C9D_43FB31845A73_
16 #define INCG_IRIS_IUTEST_FACTORY_HPP_9C2B4B94_95A0_479A_9C9D_43FB31845A73_
38 virtual ~iuFactoryBase() {}
40 virtual auto_ptr<Test> Create() = 0;
48 template<
class Tester>
54 auto_ptr<Test> p(
new Tester() );
64 template<
typename ParamType>
65 class iuParamTestFactoryBase :
public iuFactoryBase
68 iuParamTestFactoryBase() : m_param() {}
69 explicit iuParamTestFactoryBase(ParamType param) : m_param(param) {}
71 void SetParam(ParamType param) { m_param = param; }
72 const ParamType& GetParam()
const {
return m_param; }
83 template<
class Tester>
84 class iuParamTestFactory
IUTEST_CXX_FINAL :
public iuParamTestFactoryBase<typename Tester::ParamType>
86 typedef typename Tester::ParamType ParamType;
87 typedef iuParamTestFactoryBase<ParamType> _Mybase;
90 explicit iuParamTestFactory(ParamType param) : _Mybase(param) {}
95 Tester::SetParam(&this->m_param);
96 auto_ptr<Test> p(
new Tester() );
#define IUTEST_CXX_FINAL
final definition
Definition: iutest_compiler.hpp:756
#define IUTEST_CXX_OVERRIDE
override definition
Definition: iutest_compiler.hpp:747
#define IUTEST_CXX_NOEXCEPT_SPEC
noexcept specification definition
Definition: iutest_compiler.hpp:811
#define IUTEST_CXX_DEFAULT_FUNCTION
default function
Definition: iutest_compiler.hpp:494
#define IUTEST_PP_DISALLOW_COPY_AND_ASSIGN(TypeName)
コピー禁止定義
Definition: iutest_pp.hpp:31
iutest root namespace
Definition: iutest_charcode.hpp:33