X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Fframework.cc;h=92aacfeea30a37f117efabfa514285b1ae9f50bb;hb=b30da3e793829246675966830c668c3f60496e07;hp=9b351048d84cc7d53c82fd3bd1865e379aaba78b;hpb=23dca174eef8d846e3d4402729b57f6ded035e64;p=awesomized%2Flibmemcached diff --git a/libtest/framework.cc b/libtest/framework.cc index 9b351048..92aacfee 100644 --- a/libtest/framework.cc +++ b/libtest/framework.cc @@ -34,12 +34,13 @@ * */ -#include "mem_config.h" +#include "libtest/yatlcon.h" #include #include #include +#include #include #include @@ -67,7 +68,7 @@ Framework::Framework(libtest::SignalThread& signal_, get_world(this); } -void Framework::collections(collection_st* collections_) +void Framework::collections(collection_st collections_[]) { for (collection_st *next= collections_; next and next->name; next++) { @@ -86,12 +87,8 @@ Framework::~Framework() delete _runner; - for (std::vector::iterator iter= _collection.begin(); - iter != _collection.end(); - ++iter) - { - delete *iter; - } + std::for_each(_collection.begin(), _collection.end(), DeleteFromVector()); + _collection.clear(); } bool Framework::match(const char* arg) @@ -136,12 +133,12 @@ void Framework::exec() break; } } - catch (libtest::fatal& e) + catch (const libtest::fatal& e) { _failed++; - stream::cerr(e.file(), e.line(), e.func()) << e.mesg(); + stream::cerr(e.file(), e.line(), e.func()) << e.what(); } - catch (libtest::disconnected& e) + catch (const libtest::disconnected& e) { _failed++; Error << "Unhandled disconnection occurred:" << e.what();