summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2011-02-10 10:23:17 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2011-02-17 15:02:14 (GMT)
commit1b5ee40f491daf0f0b1d44b648ffb7b0ca8b8a63 (patch)
tree6f540c43c2c5c6855825c341b484b9b177ad3195 /tests
parentbaed5fdbc1d14e3190b9834f00be9926f9600d62 (diff)
downloadQt-1b5ee40f491daf0f0b1d44b648ffb7b0ca8b8a63.zip
Qt-1b5ee40f491daf0f0b1d44b648ffb7b0ca8b8a63.tar.gz
Qt-1b5ee40f491daf0f0b1d44b648ffb7b0ca8b8a63.tar.bz2
Make the QtDBus parser not complain about unknown things
Keep only the warnings about application errors. If the unknown things come from the outside, it's not our job to make noise. Task-number: QTBUG-17476
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qdbusxmlparser/tst_qdbusxmlparser.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/auto/qdbusxmlparser/tst_qdbusxmlparser.cpp b/tests/auto/qdbusxmlparser/tst_qdbusxmlparser.cpp
index 25595c5..f83795c 100644
--- a/tests/auto/qdbusxmlparser/tst_qdbusxmlparser.cpp
+++ b/tests/auto/qdbusxmlparser/tst_qdbusxmlparser.cpp
@@ -287,11 +287,14 @@ void tst_QDBusXmlParser::methods_data()
"</method>" << map;
// one invalid arg
+ method.inputArgs << arg("~", "invalid");
+ map.clear();
+ map << method;
QTest::newRow("two-in-one-invalid") <<
"<method name=\"Method\">"
"<arg type=\"s\" direction=\"in\"/>"
- "<arg type=\"~\" name=\"invalid\" direction=\"in\"/>" // this line should be ignored
"<arg type=\"v\" direction=\"in\"/>"
+ "<arg type=\"~\" name=\"invalid\" direction=\"in\"/>"
"</method>" << map;
// one out argument
@@ -380,8 +383,6 @@ void tst_QDBusXmlParser::methods()
QFETCH(QString, xmlDataFragment);
- if (strcmp(QTest::currentDataTag(), "two-in-one-invalid") == 0)
- QTest::ignoreMessage(QtWarningMsg, "Invalid D-BUS type signature '~' found while parsing introspection");
QDBusIntrospection::Interface iface =
QDBusIntrospection::parseInterface(xmlHeader + xmlDataFragment + xmlFooter);
@@ -390,9 +391,9 @@ void tst_QDBusXmlParser::methods()
QFETCH(MethodMap, methodMap);
MethodMap parsedMap = iface.methods;
- QCOMPARE(methodMap.count(), parsedMap.count());
- QCOMPARE(methodMap, parsedMap);
-}
+ QCOMPARE(parsedMap.count(), methodMap.count());
+ QCOMPARE(parsedMap, methodMap);
+}
void tst_QDBusXmlParser::signals__data()
{