summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp9
-rw-r--r--tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp14
2 files changed, 10 insertions, 13 deletions
diff --git a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp
index a5f9846..80241ba 100644
--- a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp
+++ b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp
@@ -112,12 +112,10 @@ void tst_QDeclarativeDebugClient::status()
{
QDeclarativeDebugTestService service("tst_QDeclarativeDebugClient::status()");
- QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged()));
- QCOMPARE(client.status(), QDeclarativeDebugClient::Enabled);
+ QTRY_COMPARE(client.status(), QDeclarativeDebugClient::Enabled);
}
- QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged()));
- QCOMPARE(client.status(), QDeclarativeDebugClient::Unavailable);
+ QTRY_COMPARE(client.status(), QDeclarativeDebugClient::Unavailable);
// duplicate plugin name
QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugClient: Conflicting plugin name \"tst_QDeclarativeDebugClient::status()\" ");
@@ -135,7 +133,8 @@ void tst_QDeclarativeDebugClient::sendMessage()
QByteArray msg = "hello!";
- QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged()));
+ QTRY_COMPARE(client.status(), QDeclarativeDebugClient::Enabled);
+
client.sendMessage(msg);
QByteArray resp = client.waitForResponse();
QCOMPARE(resp, msg);
diff --git a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp
index bce4713..538129c 100644
--- a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp
+++ b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp
@@ -103,12 +103,12 @@ void tst_QDeclarativeDebugService::status()
{
QDeclarativeDebugTestClient client("tst_QDeclarativeDebugService::status()", m_conn);
- QDeclarativeDebugTest::waitForSignal(&service, SIGNAL(statusHasChanged()));
- QCOMPARE(service.status(), QDeclarativeDebugService::Enabled);
+ QTRY_COMPARE(client.status(), QDeclarativeDebugClient::Enabled);
+ QTRY_COMPARE(service.status(), QDeclarativeDebugService::Enabled);
}
- QDeclarativeDebugTest::waitForSignal(&service, SIGNAL(statusHasChanged()));
- QCOMPARE(service.status(), QDeclarativeDebugService::Unavailable);
+
+ QTRY_COMPARE(service.status(), QDeclarativeDebugService::Unavailable);
QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugService: Conflicting plugin name \"tst_QDeclarativeDebugService::status()\" ");
@@ -123,10 +123,8 @@ void tst_QDeclarativeDebugService::sendMessage()
QByteArray msg = "hello!";
- if (service.status() != QDeclarativeDebugService::Enabled)
- QDeclarativeDebugTest::waitForSignal(&service, SIGNAL(statusHasChanged()));
- if (client.status() != QDeclarativeDebugClient::Enabled)
- QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged()));
+ QTRY_COMPARE(client.status(), QDeclarativeDebugClient::Enabled);
+ QTRY_COMPARE(service.status(), QDeclarativeDebugService::Enabled);
client.sendMessage(msg);
QByteArray resp = client.waitForResponse();