summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-06-30 09:47:46 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-07-02 09:43:29 (GMT)
commit6b0b1a3eefe60dbeed3f56770fb58d487852e45b (patch)
treee85d5ae7a9ded3bf56fedfac9985976710527df8 /tests
parentbda9c20a556aa6ab6ccba978f7fc1ffe02c50813 (diff)
downloadQt-6b0b1a3eefe60dbeed3f56770fb58d487852e45b.zip
Qt-6b0b1a3eefe60dbeed3f56770fb58d487852e45b.tar.gz
Qt-6b0b1a3eefe60dbeed3f56770fb58d487852e45b.tar.bz2
Adapt the message-sending code to return error messages from the
marshalling code. Reviewed-By: Harald Fernengel
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qdbusmarshall/tst_qdbusmarshall.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/auto/qdbusmarshall/tst_qdbusmarshall.cpp b/tests/auto/qdbusmarshall/tst_qdbusmarshall.cpp
index e5b2ebb..3ba789a 100644
--- a/tests/auto/qdbusmarshall/tst_qdbusmarshall.cpp
+++ b/tests/auto/qdbusmarshall/tst_qdbusmarshall.cpp
@@ -793,7 +793,7 @@ void tst_QDBusMarshall::sendErrors()
"signalName");
msg << qVariantFromValue(QDBusObjectPath());
- QTest::ignoreMessage(QtWarningMsg, "QDBusConnection: error: could not send signal path \"/foo\" interface \"local.interfaceName\" member \"signalName\"");
+ QTest::ignoreMessage(QtWarningMsg, "QDBusConnection: error: could not send signal path \"/foo\" interface \"local.interfaceName\" member \"signalName\": Marshalling failed: Invalid object path passed in arguments");
QVERIFY(!con.send(msg));
msg.setArguments(QVariantList());
@@ -803,7 +803,19 @@ void tst_QDBusMarshall::sendErrors()
path.setPath("abc");
msg << qVariantFromValue(path);
- QTest::ignoreMessage(QtWarningMsg, "QDBusConnection: error: could not send signal path \"/foo\" interface \"local.interfaceName\" member \"signalName\"");
+ QTest::ignoreMessage(QtWarningMsg, "QDBusConnection: error: could not send signal path \"/foo\" interface \"local.interfaceName\" member \"signalName\": Marshalling failed: Invalid object path passed in arguments");
+ QVERIFY(!con.send(msg));
+
+ QDBusSignature sig;
+ msg.setArguments(QVariantList() << qVariantFromValue(sig));
+ QTest::ignoreMessage(QtWarningMsg, "QDBusConnection: error: could not send signal path \"/foo\" interface \"local.interfaceName\" member \"signalName\": Marshalling failed: Invalid signature passed in arguments");
+ QVERIFY(!con.send(msg));
+
+ QTest::ignoreMessage(QtWarningMsg, "QDBusSignature: invalid signature \"a\"");
+ sig.setSignature("a");
+ msg.setArguments(QVariantList());
+ msg << qVariantFromValue(sig);
+ QTest::ignoreMessage(QtWarningMsg, "QDBusConnection: error: could not send signal path \"/foo\" interface \"local.interfaceName\" member \"signalName\": Marshalling failed: Invalid signature passed in arguments");
QVERIFY(!con.send(msg));
}