projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
See if we can clean up error reporting on one test for Ubuntu 12.04
[awesomized/libmemcached]
/
libtest
/
framework.cc
diff --git
a/libtest/framework.cc
b/libtest/framework.cc
index f8bc78c916375b9cfc8019733b9cfc2a5c647ad9..30f511afdbf484850dc5cb18125888e8f332040d 100644
(file)
--- a/
libtest/framework.cc
+++ b/
libtest/framework.cc
@@
-40,6
+40,7
@@
#include <libtest/collection.h>
#include <libtest/signal.h>
#include <libtest/collection.h>
#include <libtest/signal.h>
+#include <algorithm>
#include <fnmatch.h>
#include <iostream>
#include <fnmatch.h>
#include <iostream>
@@
-86,12
+87,8
@@
Framework::~Framework()
delete _runner;
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)
}
bool Framework::match(const char* arg)
@@
-136,12
+133,12
@@
void Framework::exec()
break;
}
}
break;
}
}
- catch (libtest::fatal& e)
+ catch (
const
libtest::fatal& e)
{
_failed++;
stream::cerr(e.file(), e.line(), e.func()) << e.what();
}
{
_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();
{
_failed++;
Error << "Unhandled disconnection occurred:" << e.what();