summaryrefslogtreecommitdiffstats
path: root/src/testlib/qxmltestlogger.cpp
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2009-05-07 04:09:08 (GMT)
committerRohan McGovern <rohan.mcgovern@nokia.com>2009-05-07 04:56:06 (GMT)
commit56335c9891230de3b87d401110b83656381729ac (patch)
treec06fa4ea973c5d81f1161c748560066eae4eccee /src/testlib/qxmltestlogger.cpp
parent014b5d404b19ad3d81686ba490eb7dd93efee573 (diff)
downloadQt-56335c9891230de3b87d401110b83656381729ac.zip
Qt-56335c9891230de3b87d401110b83656381729ac.tar.gz
Qt-56335c9891230de3b87d401110b83656381729ac.tar.bz2
Fixed qDebugs within tests being written as "error" tags in the
xunitxml testlog. `error' in xunit causes many xunit processing tools to consider the test as failing. This is different semantics from native testlib XML, where a qDebug is considered a message and not a failure. Change it to put qDebugs under the "system-err" tag when using xunitxml to retain semantic compatibility with testlib XML. Autotest: tst_selftests
Diffstat (limited to 'src/testlib/qxmltestlogger.cpp')
-rw-r--r--src/testlib/qxmltestlogger.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/testlib/qxmltestlogger.cpp b/src/testlib/qxmltestlogger.cpp
index ec9a5d2..0606ced 100644
--- a/src/testlib/qxmltestlogger.cpp
+++ b/src/testlib/qxmltestlogger.cpp
@@ -325,6 +325,10 @@ void QXmlTestLogger::xmlQuote(char* dest, char const* src, size_t n)
MAP_ENTITY('"', "&quot;");
MAP_ENTITY('&', "&amp;");
+ // not strictly necessary, but allows handling of comments without
+ // having to explicitly look for `--'
+ MAP_ENTITY('-', "&#x002D;");
+
#undef MAP_ENTITY
case 0: