]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/include/yaffut-parameters.hh
Doc-es: various updates.
[lilypond.git] / flower / include / yaffut-parameters.hh
index 9a569f903ca45a7ac73d5de938b196e38ea6d015..ed7bc0c581ee966573acef30df86daccfb6d3769 100644 (file)
@@ -3,28 +3,17 @@
 
 #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__