summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/qt/tst_qdbusconnection.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/test/qt/tst_qdbusconnection.cpp b/test/qt/tst_qdbusconnection.cpp
index 6b6095bd..e14debdc 100644
--- a/test/qt/tst_qdbusconnection.cpp
+++ b/test/qt/tst_qdbusconnection.cpp
@@ -34,15 +34,15 @@ void tst_QDBusConnection::sendSignal()
QDBusConnection con = QDBusConnection::addConnection(
QDBusConnection::SessionBus);
- VERIFY(con.isConnected());
+ QVERIFY(con.isConnected());
QDBusMessage msg = QDBusMessage::signal("/org/kde/selftest", "org.kde.selftest",
"Ping");
msg << QLatin1String("ping");
- VERIFY(con.send(msg));
+ QVERIFY(con.send(msg));
- QTest::wait(1000);
+ QTest::qWait(1000);
}
void tst_QDBusConnection::send()
@@ -50,35 +50,35 @@ void tst_QDBusConnection::send()
QDBusConnection con = QDBusConnection::addConnection(
QDBusConnection::SessionBus);
- VERIFY(con.isConnected());
+ QVERIFY(con.isConnected());
QDBusMessage msg = QDBusMessage::methodCall("org.freedesktop.DBus",
"/org/freedesktop/DBus", "org.freedesktop.DBus", "ListNames");
QDBusMessage reply = con.sendWithReply(msg);
- COMPARE(reply.count(), 1);
- COMPARE(reply.at(0).typeName(), "QStringList");
- VERIFY(reply.at(0).toStringList().contains(con.baseService()));
+ QCOMPARE(reply.count(), 1);
+ QCOMPARE(reply.at(0).typeName(), "QStringList");
+ QVERIFY(reply.at(0).toStringList().contains(con.baseService()));
}
void tst_QDBusConnection::sendAsync()
{
QDBusConnection con = QDBusConnection::addConnection(QDBusConnection::SessionBus);
- VERIFY(con.isConnected());
+ QVERIFY(con.isConnected());
QDBusSpy spy;
QDBusMessage msg = QDBusMessage::methodCall("org.freedesktop.DBus",
"/org/freedesktop/DBus", "org.freedesktop.DBus", "ListNames");
int msgId = con.sendWithReplyAsync(msg, &spy, SLOT(asyncReply(QDBusMessage)));
- VERIFY(msgId != 0);
+ QVERIFY(msgId != 0);
- QTest::wait(1000);
+ QTest::qWait(1000);
- COMPARE(spy.args.value(0).typeName(), "QStringList");
- VERIFY(spy.args.at(0).toStringList().contains(con.baseService()));
- COMPARE(spy.serial, msgId);
+ QCOMPARE(spy.args.value(0).typeName(), "QStringList");
+ QVERIFY(spy.args.at(0).toStringList().contains(con.baseService()));
+ QCOMPARE(spy.serial, msgId);
}
void tst_QDBusConnection::connect()
@@ -95,12 +95,12 @@ void tst_QDBusConnection::connect()
"ping");
msg << QLatin1String("ping");
- VERIFY(con.send(msg));
+ QVERIFY(con.send(msg));
- QTest::wait(1000);
+ QTest::qWait(1000);
- COMPARE(spy.args.count(), 1);
- COMPARE(spy.args.at(0).toString(), QString("ping"));
+ QCOMPARE(spy.args.count(), 1);
+ QCOMPARE(spy.args.at(0).toString(), QString("ping"));
}
void tst_QDBusConnection::addConnection()
@@ -109,51 +109,51 @@ void tst_QDBusConnection::addConnection()
QDBusConnection con = QDBusConnection::addConnection(
QDBusConnection::SessionBus, "bubu");
- VERIFY(con.isConnected());
- VERIFY(!con.lastError().isValid());
+ QVERIFY(con.isConnected());
+ QVERIFY(!con.lastError().isValid());
QDBusConnection con2;
- VERIFY(!con2.isConnected());
- VERIFY(!con2.lastError().isValid());
+ QVERIFY(!con2.isConnected());
+ QVERIFY(!con2.lastError().isValid());
con2 = con;
- VERIFY(con.isConnected());
- VERIFY(con2.isConnected());
- VERIFY(!con.lastError().isValid());
- VERIFY(!con2.lastError().isValid());
+ QVERIFY(con.isConnected());
+ QVERIFY(con2.isConnected());
+ QVERIFY(!con.lastError().isValid());
+ QVERIFY(!con2.lastError().isValid());
}
{
QDBusConnection con("bubu");
- VERIFY(con.isConnected());
- VERIFY(!con.lastError().isValid());
+ QVERIFY(con.isConnected());
+ QVERIFY(!con.lastError().isValid());
}
QDBusConnection::closeConnection("bubu");
{
QDBusConnection con("bubu");
- VERIFY(!con.isConnected());
- VERIFY(!con.lastError().isValid());
+ QVERIFY(!con.isConnected());
+ QVERIFY(!con.lastError().isValid());
}
{
{
QDBusConnection con = QDBusConnection::addConnection(
QDBusConnection::SessionBus);
- VERIFY(con.isConnected());
+ QVERIFY(con.isConnected());
}
{
QDBusConnection con;
- VERIFY(con.isConnected());
+ QVERIFY(con.isConnected());
QDBusConnection::closeConnection();
- VERIFY(con.isConnected());
+ QVERIFY(con.isConnected());
}
{
QDBusConnection con;
- VERIFY(!con.isConnected());
+ QVERIFY(!con.isConnected());
}
}
}