X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Fformatter.cc;h=01c57609554ecc52d2f9ab036c7baf9cb6a770d0;hb=bf8213041709c75147393c8bd6b51b8f9e064f7c;hp=f19404d49fa9d9ff0b543cf8c04669641c1c6520;hpb=d84f2d32745e94ae2f9e9668feb2668e1e1646f1;p=awesomized%2Flibmemcached diff --git a/libtest/formatter.cc b/libtest/formatter.cc index f19404d4..01c57609 100644 --- a/libtest/formatter.cc +++ b/libtest/formatter.cc @@ -34,12 +34,13 @@ * */ -#include +#include "libtest/yatlcon.h" #include -#include +#include #include +#include namespace libtest { @@ -88,17 +89,17 @@ private: libtest::Timer _timer; }; -Formatter::Formatter(const std::string& arg) : - _suite_name(arg) +Formatter::Formatter(const std::string& frame_name, const std::string& arg) { + _suite_name= frame_name; + _suite_name+= "."; + _suite_name+= arg; } Formatter::~Formatter() { - for (TestCases::iterator iter= _testcases.begin(); iter != _testcases.end(); ++iter) - { - delete *iter; - } + std::for_each(_testcases.begin(), _testcases.end(), DeleteFromVector()); + _testcases.clear(); } TestCase* Formatter::current()