[Telepathy-commits] [telepathy-qt4/master] Fixed tests to work with Connection changes.
Andre Moreira Magalhaes (andrunko)
andre.magalhaes at collabora.co.uk
Wed Feb 18 14:44:29 PST 2009
---
tests/dbus/chan-basics.cpp | 7 ++++---
tests/dbus/chan-group.cpp | 2 +-
tests/dbus/conn-basics.cpp | 9 +++++----
tests/dbus/conn-requests.cpp | 2 +-
tests/dbus/contacts.cpp | 7 ++++---
tests/dbus/handles.cpp | 2 +-
tests/pinocchio/conn-basics.cpp | 14 +++++---------
7 files changed, 21 insertions(+), 22 deletions(-)
diff --git a/tests/dbus/chan-basics.cpp b/tests/dbus/chan-basics.cpp
index 1921fda..6e4d3d2 100644
--- a/tests/dbus/chan-basics.cpp
+++ b/tests/dbus/chan-basics.cpp
@@ -9,7 +9,7 @@
#include <TelepathyQt4/Client/Connection>
#include <TelepathyQt4/Client/PendingChannel>
#include <TelepathyQt4/Client/PendingHandles>
-#include <TelepathyQt4/Client/PendingReadyConnection>
+#include <TelepathyQt4/Client/PendingReady>
#include <TelepathyQt4/Client/PendingReadyChannel>
#include <TelepathyQt4/Client/ReferencedHandles>
#include <TelepathyQt4/Debug>
@@ -204,11 +204,12 @@ void TestChanBasics::initTestCase()
mConn->requestConnect();
- QVERIFY(connect(mConn->becomeReady(),
+ QSet<uint> features = QSet<uint>() << Connection::FeatureSelfContact;
+ QVERIFY(connect(mConn->becomeReady(features),
SIGNAL(finished(Telepathy::Client::PendingOperation*)),
SLOT(expectSuccessfulCall(Telepathy::Client::PendingOperation*))));
QCOMPARE(mLoop->exec(), 0);
- QCOMPARE(mConn->isReady(), true);
+ QCOMPARE(mConn->isReady(features), true);
if (mConn->status() != Connection::StatusConnected) {
QVERIFY(connect(mConn,
diff --git a/tests/dbus/chan-group.cpp b/tests/dbus/chan-group.cpp
index e01f681..6aaed4f 100644
--- a/tests/dbus/chan-group.cpp
+++ b/tests/dbus/chan-group.cpp
@@ -11,7 +11,7 @@
#include <TelepathyQt4/Client/PendingChannel>
#include <TelepathyQt4/Client/PendingContacts>
#include <TelepathyQt4/Client/PendingHandles>
-#include <TelepathyQt4/Client/PendingReadyConnection>
+#include <TelepathyQt4/Client/PendingReady>
#include <TelepathyQt4/Client/PendingReadyChannel>
#include <TelepathyQt4/Client/ReferencedHandles>
#include <TelepathyQt4/Debug>
diff --git a/tests/dbus/conn-basics.cpp b/tests/dbus/conn-basics.cpp
index 4bcd1cc..39910b6 100644
--- a/tests/dbus/conn-basics.cpp
+++ b/tests/dbus/conn-basics.cpp
@@ -7,7 +7,7 @@
#include <TelepathyQt4/Client/Connection>
#include <TelepathyQt4/Client/PendingChannel>
-#include <TelepathyQt4/Client/PendingReadyConnection>
+#include <TelepathyQt4/Client/PendingReady>
#include <TelepathyQt4/Debug>
#include <telepathy-glib/debug.h>
@@ -148,12 +148,13 @@ void TestConnBasics::init()
void TestConnBasics::testSimplePresence()
{
- QCOMPARE(mConn->isReady(Connection::FeatureSimplePresence), false);
- QVERIFY(connect(mConn->becomeReady(Connection::FeatureSimplePresence),
+ QSet<uint> features = QSet<uint>() << Connection::FeatureSimplePresence;
+ QCOMPARE(mConn->isReady(features), false);
+ QVERIFY(connect(mConn->becomeReady(features),
SIGNAL(finished(Telepathy::Client::PendingOperation*)),
SLOT(expectSuccessfulCall(Telepathy::Client::PendingOperation*))));
QCOMPARE(mLoop->exec(), 0);
- QCOMPARE(mConn->isReady(Connection::FeatureSimplePresence), true);
+ QCOMPARE(mConn->isReady(features), true);
qDebug() << "mConn->status:" << mConn->status();
}
diff --git a/tests/dbus/conn-requests.cpp b/tests/dbus/conn-requests.cpp
index 0a8b17d..b7b34f4 100644
--- a/tests/dbus/conn-requests.cpp
+++ b/tests/dbus/conn-requests.cpp
@@ -8,7 +8,7 @@
#include <TelepathyQt4/Client/Channel>
#include <TelepathyQt4/Client/Connection>
#include <TelepathyQt4/Client/PendingChannel>
-#include <TelepathyQt4/Client/PendingReadyConnection>
+#include <TelepathyQt4/Client/PendingReady>
#include <TelepathyQt4/Client/PendingHandles>
#include <TelepathyQt4/Client/ReferencedHandles>
#include <TelepathyQt4/Debug>
diff --git a/tests/dbus/contacts.cpp b/tests/dbus/contacts.cpp
index 2e27b07..b41dc61 100644
--- a/tests/dbus/contacts.cpp
+++ b/tests/dbus/contacts.cpp
@@ -11,7 +11,7 @@
#include <TelepathyQt4/Client/ContactManager>
#include <TelepathyQt4/Client/PendingContacts>
#include <TelepathyQt4/Client/PendingVoidMethodCall>
-#include <TelepathyQt4/Client/PendingReadyConnection>
+#include <TelepathyQt4/Client/PendingReady>
#include <TelepathyQt4/Client/ReferencedHandles>
#include <TelepathyQt4/Debug>
#include <TelepathyQt4/Types>
@@ -157,11 +157,12 @@ void TestContacts::initTestCase()
mConn->requestConnect();
- QVERIFY(connect(mConn->becomeReady(),
+ QSet<uint> features = QSet<uint>() << Connection::FeatureSelfContact;
+ QVERIFY(connect(mConn->becomeReady(features),
SIGNAL(finished(Telepathy::Client::PendingOperation*)),
SLOT(expectSuccessfulCall(Telepathy::Client::PendingOperation*))));
QCOMPARE(mLoop->exec(), 0);
- QCOMPARE(mConn->isReady(), true);
+ QCOMPARE(mConn->isReady(features), true);
if (mConn->status() != Connection::StatusConnected) {
QVERIFY(connect(mConn,
diff --git a/tests/dbus/handles.cpp b/tests/dbus/handles.cpp
index b318fd5..aa2304d 100644
--- a/tests/dbus/handles.cpp
+++ b/tests/dbus/handles.cpp
@@ -8,7 +8,7 @@
#include <TelepathyQt4/Client/Connection>
#include <TelepathyQt4/Client/PendingHandles>
#include <TelepathyQt4/Client/PendingVoidMethodCall>
-#include <TelepathyQt4/Client/PendingReadyConnection>
+#include <TelepathyQt4/Client/PendingReady>
#include <TelepathyQt4/Client/ReferencedHandles>
#include <TelepathyQt4/Debug>
diff --git a/tests/pinocchio/conn-basics.cpp b/tests/pinocchio/conn-basics.cpp
index 4c032bc..9c24811 100644
--- a/tests/pinocchio/conn-basics.cpp
+++ b/tests/pinocchio/conn-basics.cpp
@@ -7,7 +7,7 @@
#include <TelepathyQt4/Client/DBus>
#include <TelepathyQt4/Client/Connection>
#include <TelepathyQt4/Client/ConnectionManager>
-#include <TelepathyQt4/Client/PendingReadyConnection>
+#include <TelepathyQt4/Client/PendingReady>
#include <TelepathyQt4/Client/PendingReadyConnectionManager>
#include <tests/pinocchio/lib.h>
@@ -167,18 +167,14 @@ void TestConnBasics::testConnect()
QCOMPARE(mConn->status(), (uint) Connection::StatusConnected);
}
- QVERIFY(connect(mConn->becomeReady(Connection::FeatureSimplePresence),
+ QSet<uint> features = QSet<uint>() << Connection::FeatureSimplePresence;
+ QVERIFY(connect(mConn->becomeReady(features),
SIGNAL(finished(Telepathy::Client::PendingOperation*)),
this,
SLOT(expectSuccessfulCall(Telepathy::Client::PendingOperation*))));
QCOMPARE(mLoop->exec(), 0);
-
- QVERIFY(connect(mConn->becomeReady(Connection::FeatureSimplePresence),
- SIGNAL(finished(Telepathy::Client::PendingOperation*)),
- this,
- SLOT(expectSuccessfulCall(Telepathy::Client::PendingOperation*))));
- QCOMPARE(mLoop->exec(), 0);
- QCOMPARE(mConn->isReady(Connection::FeatureSimplePresence), false);
+ QCOMPARE(mConn->isReady(features), true);
+ QVERIFY(mConn->missingFeatures() == features);
QCOMPARE(static_cast<uint>(mConn->status()),
static_cast<uint>(Connection::StatusConnected));
--
1.5.6.5
More information about the telepathy-commits
mailing list