#include <libtest/collection.h>
#include <libtest/signal.h>
+#include <algorithm>
#include <fnmatch.h>
#include <iostream>
delete _runner;
- for (std::vector<Collection*>::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)
break;
}
}
- catch (libtest::fatal& e)
+ catch (const libtest::fatal& e)
{
_failed++;
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();