telepathy-qt: dbus-tubes: Compare the expected handle/ service combination when bus names change
Dario Freddi
drf at kemper.freedesktop.org
Tue Jul 3 15:08:44 PDT 2012
Module: telepathy-qt
Branch: master
Commit: d5a9a619c67f69d252ab188df8e4ab7ae841164e
URL: http://cgit.freedesktop.org/telepathy/telepathy-qt/commit/?id=d5a9a619c67f69d252ab188df8e4ab7ae841164e
Author: Dario Freddi <dario.freddi at collabora.com>
Date: Fri Nov 4 21:47:57 2011 +0100
dbus-tubes: Compare the expected handle/service combination when bus names change
---
tests/dbus/dbus-tube-chan.cpp | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/tests/dbus/dbus-tube-chan.cpp b/tests/dbus/dbus-tube-chan.cpp
index b86ecae..ce963d9 100644
--- a/tests/dbus/dbus-tube-chan.cpp
+++ b/tests/dbus/dbus-tube-chan.cpp
@@ -110,12 +110,17 @@ void TestDBusTubeChan::onBusNamesChanged(const QHash<ContactPtr, QString> &added
mCurrentBusNames.insert(i.key(), i.value());
mGotRemoteConnection = true;
qDebug() << "Adding " << i.key()->id();
+
+ QCOMPARE(i.value(), mExpectedService);
+ QCOMPARE(i.key()->handle().first(), mExpectedHandle);
}
Q_FOREACH (const ContactPtr &contact, removed) {
QVERIFY(mCurrentBusNames.contains(contact));
mCurrentBusNames.remove(contact);
mGotConnectionClosed = true;
qDebug() << "Removing " << contact->id();
+
+ QCOMPARE(contact->handle().first(), mExpectedHandle);
}
QCOMPARE(mChan->busNames().size(), mCurrentBusNames.size());
@@ -477,7 +482,7 @@ void TestDBusTubeChan::testOfferSuccess()
g_free(bobService);
mExpectedHandle = bobHandle;
- mExpectedService = QLatin1String("bob");
+ mExpectedService = QLatin1String("org.bob.test");
QCOMPARE(mChan->state(), TubeChannelStateRemotePending);
@@ -554,7 +559,7 @@ void TestDBusTubeChan::testOutgoingBusNameMonitoring()
gchar *service = g_strdup("org.not.seen.yet");
mExpectedHandle = handle;
- mExpectedService = QLatin1String("youhaventseenmeyet");
+ mExpectedService = QLatin1String("org.not.seen.yet");
tp_tests_dbus_tube_channel_peer_connected_no_stream(mChanService,
service, handle);
More information about the telepathy-commits
mailing list