#include "yaffut.hh"
-namespace yaffut {
-template <typename Suite, typename ParameterOne, typename Case>
-struct TestOne: public ITest, public Suite
-{
- ParameterOne const parameter_one_;
- //static Registrator<Suite, Case> s_Registrator;
- TestOne(ParameterOne p)
- : Suite(p)
- , parameter_one_ (p)
- {
- Registrator<Suite, Case>* r = &Test<Suite, Case>::s_Registrator;
- r = 0;
- }
-};
-
-#define TEST_STRING(Suite, Case, String)\
+#define TEST_PARAMETER(Suite, Case, Type, value) \
namespace { \
- struct Case: public yaffut::TestOne<Suite, std::string, Case>{ Case(); }; \
+ struct Case: public yaffut::Test<Suite, Case>{ \
+ Type parameter_one_; \
+ Case (); \
+ }; \
} \
- template struct yaffut::TestOne<Suite, std::string, Case>; Case::Case() \
- : yaffut::TestOne<Suite, std::string, Case> (String)
+template struct yaffut::Test<Suite, Case>; Case::Case () \
+ : Suite (value), parameter_one_ (value)
-}
+#define TEST_STRING(Suite, Case, String) \
+ TEST_PARAMETER(Suite, Case, std::string, String)
#endif // __YAFFUT_PARAMETERS_H__