X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftest.h;h=0b12dbefa9a6a16d4c7534e55cc09bf6c2cfe886;hb=refs%2Fheads%2Fmaster;hp=a6dad93f2dede3c7c6f0460cfec4c7ccd5c1d45c;hpb=84073af773c83826eca7525d35d7cd92a3658f75;p=libs%2Ftest.git diff --git a/source/test.h b/source/test.h index a6dad93..0b12dbe 100644 --- a/source/test.h +++ b/source/test.h @@ -61,6 +61,13 @@ protected: return *functions.back(); } + template + Function &add(void (T::*f)(A), const A &a, const std::string &d) + { + functions.push_back(new TypedFunction1(f, a, d)); + return *functions.back(); + } + public: static void run_single(const std::string &, bool); static void run_all(bool);