X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftest.h;h=0b12dbefa9a6a16d4c7534e55cc09bf6c2cfe886;hb=e1f68c3afcd3133184b0628c3e3225f43fb9e772;hp=d410377c4793102bb90525d6246fe77e5ca31b80;hpb=89a507ffd4e41ee5f270034b8ad783963afd0be4;p=libs%2Ftest.git diff --git a/source/test.h b/source/test.h index d410377..0b12dbe 100644 --- a/source/test.h +++ b/source/test.h @@ -43,6 +43,7 @@ private: std::list functions; std::string detail_info; std::string detail_debug; + std::string fail_reason; bool passed; protected: @@ -60,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);