]> git.tdb.fi Git - libs/test.git/blobdiff - source/test.h
Support passing a parameter to a test function
[libs/test.git] / source / test.h
index a6dad93f2dede3c7c6f0460cfec4c7ccd5c1d45c..0b12dbefa9a6a16d4c7534e55cc09bf6c2cfe886 100644 (file)
@@ -61,6 +61,13 @@ protected:
                return *functions.back();
        }
 
+       template<typename T, typename A>
+       Function &add(void (T::*f)(A), const A &a, const std::string &d)
+       {
+               functions.push_back(new TypedFunction1<T, A>(f, a, d));
+               return *functions.back();
+       }
+
 public:
        static void run_single(const std::string &, bool);
        static void run_all(bool);