diff options
Diffstat (limited to 'tests/auto/qdbusreply/tst_qdbusreply.cpp')
-rw-r--r-- | tests/auto/qdbusreply/tst_qdbusreply.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/qdbusreply/tst_qdbusreply.cpp b/tests/auto/qdbusreply/tst_qdbusreply.cpp index 9866302..e36d288 100644 --- a/tests/auto/qdbusreply/tst_qdbusreply.cpp +++ b/tests/auto/qdbusreply/tst_qdbusreply.cpp @@ -93,6 +93,7 @@ private slots: } void init(); + void unconnected(); void simpleTypes(); void complexTypes(); void wrongTypes(); @@ -236,6 +237,21 @@ void tst_QDBusReply::init() QVERIFY(iface->isValid()); } +void tst_QDBusReply::unconnected() +{ + QDBusConnection con("invalid stored connection"); + QVERIFY(!con.isConnected()); + QDBusInterface iface("doesnt.matter", "/", "doesnt.matter", con); + QVERIFY(!iface.isValid()); + + QDBusReply<void> rvoid = iface.asyncCall("ReloadConfig"); + QVERIFY(!rvoid.isValid()); + + QDBusReply<QString> rstring = iface.asyncCall("GetId"); + QVERIFY(!rstring.isValid()); + QVERIFY(rstring.value().isEmpty()); +} + void tst_QDBusReply::simpleTypes() { QDBusReply<bool> rbool = iface->call(QDBus::BlockWithGui, "retrieveBool"); |