projects
/
framework
/
web
/
wrt-commons.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tizen 2.4 release
[framework/web/wrt-commons.git]
/
modules
/
test
/
src
/
test_runner.cpp
diff --git
a/modules_wearable/test/src/test_runner.cpp
b/modules/test/src/test_runner.cpp
similarity index 97%
rename from
modules_wearable/test/src/test_runner.cpp
rename to
modules/test/src/test_runner.cpp
index
aaac7af
..
483720f
100644
(file)
--- a/
modules_wearable/test/src/test_runner.cpp
+++ b/
modules/test/src/test_runner.cpp
@@
-24,9
+24,10
@@
#include <dpl/test/test_runner.h>
#include <dpl/test/test_results_collector.h>
#include <dpl/exception.h>
#include <dpl/test/test_runner.h>
#include <dpl/test/test_results_collector.h>
#include <dpl/exception.h>
-#include <dpl/scoped_free.h>
+#include <dpl/free_deleter.h>
+#include <memory>
#include <dpl/foreach.h>
#include <dpl/foreach.h>
-#include <dpl/log/log.h>
+#include <dpl/log/
wrt_
log.h>
#include <dpl/colors.h>
#include <pcrecpp.h>
#include <algorithm>
#include <dpl/colors.h>
#include <pcrecpp.h>
#include <algorithm>
@@
-65,11
+66,11
@@
namespace // anonymous
{
std::string BaseName(std::string aPath)
{
{
std::string BaseName(std::string aPath)
{
-
ScopedFree<cha
r> path(strdup(aPath.c_str()));
- if (NULL == path.
G
et()) {
+
std::unique_ptr<char[],free_delete
r> path(strdup(aPath.c_str()));
+ if (NULL == path.
g
et()) {
throw std::bad_alloc();
}
throw std::bad_alloc();
}
- char* baseName = basename(path.
G
et());
+ char* baseName = basename(path.
g
et());
std::string retValue = baseName;
return retValue;
}
std::string retValue = baseName;
return retValue;
}
@@
-188,14
+189,14
@@
bool TestRunner::filterGroupsByXmls(const std::vector<std::string> & files)
}
xmlNodeSetPtr nodes = xpathObject->nodesetval;
unsigned size = (nodes) ? nodes->nodeNr : 0;
}
xmlNodeSetPtr nodes = xpathObject->nodesetval;
unsigned size = (nodes) ? nodes->nodeNr : 0;
-
LogDebug("Found " << size << " nodes matching xpath"
);
+
WrtLogD("Found %i nodes matching xpath", size
);
for(unsigned i = 0; i < size; ++i)
{
for(unsigned i = 0; i < size; ++i)
{
-
LogPedantic("Type: " <<
nodes->nodeTab[i]->type);
+
WrtLogD("Type: %i",
nodes->nodeTab[i]->type);
if (nodes->nodeTab[i]->type == XML_ATTRIBUTE_NODE) {
xmlNodePtr curNode = nodes->nodeTab[i];
result = getXMLNode(curNode);
if (nodes->nodeTab[i]->type == XML_ATTRIBUTE_NODE) {
xmlNodePtr curNode = nodes->nodeTab[i];
result = getXMLNode(curNode);
-
LogPedantic("Result: " << result
);
+
WrtLogD("Result: %s", result.c_str()
);
normalizeXMLTag(result, testsuite);
casesMap.insert(make_pair(result, false));
}
normalizeXMLTag(result, testsuite);
casesMap.insert(make_pair(result, false));
}
@@
-208,7
+209,7
@@
bool TestRunner::filterGroupsByXmls(const std::vector<std::string> & files)
}
Catch(XMLError)
{
}
Catch(XMLError)
{
-
LogError("Libxml error: " << _rethrown_exception.DumpToString
());
+
WrtLogE("Libxml error: %s", _rethrown_exception.DumpToString().c_str
());
success = false;
}
xmlCleanupParser();
success = false;
}
xmlCleanupParser();
@@
-238,7
+239,7
@@
bool TestRunner::filterByXML(std::map<std::string, bool> & casesMap)
{
if(cs->second == false)
{
{
if(cs->second == false)
{
-
LogError("Cannot find testcase from XML file: " << cs->first
);
+
WrtLogE("Cannot find testcase from XML file: %s", cs->first.c_str()
);
return false;
}
}
return false;
}
}