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>
49 class iuFactory :
public iuFactoryBase
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 :
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() );
104 #endif // INCG_IRIS_IUTEST_FACTORY_HPP_9C2B4B94_95A0_479A_9C9D_43FB31845A73_