projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Update for scanner.
[awesomized/libmemcached]
/
libtest
/
framework.cc
diff --git
a/libtest/framework.cc
b/libtest/framework.cc
index 6cca8450abcbcffbc4a7672518acb96a668c0f0f..30f511afdbf484850dc5cb18125888e8f332040d 100644
(file)
--- a/
libtest/framework.cc
+++ b/
libtest/framework.cc
@@
-34,12
+34,13
@@
*
*/
*
*/
-#include
<config.h>
+#include
"libtest/yatlcon.h"
#include <libtest/common.h>
#include <libtest/collection.h>
#include <libtest/signal.h>
#include <libtest/common.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)
@@
-118,8
+115,7
@@
void Framework::exec()
_total++;
_total++;
- try
- {
+ try {
switch ((*iter)->exec())
{
case TEST_FAILURE:
switch ((*iter)->exec())
{
case TEST_FAILURE:
@@
-137,15
+133,15
@@
void Framework::exec()
break;
}
}
break;
}
}
- catch (libtest::fatal& e)
+ catch (
const
libtest::fatal& e)
{
_failed++;
{
_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++;
{
_failed++;
-
stream::cerr(e.file(), e.line(), e.func()) << "Unhandled disconnection occurred: " << e.mesg
();
+
Error << "Unhandled disconnection occurred:" << e.what
();
throw;
}
catch (...)
throw;
}
catch (...)