aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/debugger/qqmlenginedebugservice
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-07-24 15:27:58 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-07-29 09:44:39 +0000
commit0ea3c24cfe7d1057964fe864924a7ee083764084 (patch)
tree681b7df0a201641203c936e748afd7d6a7ec39b5 /tests/auto/qml/debugger/qqmlenginedebugservice
parentbb87365ffabcba3a70dd49a4c3232a12b5b224a3 (diff)
tests/qml: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).
- Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer). - Replace Q[TRY]_VERIFY(smartPointer == 0) by Q[TRY]_VERIFY(smartPointer.isNull()). - Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and add casts where necessary. The values will then be logged should a test fail. Change-Id: I8cc97fd9b48fc789a849e9527c292c4e05accd97 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'tests/auto/qml/debugger/qqmlenginedebugservice')
-rw-r--r--tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp b/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp
index 5090580cc5..0b766bc500 100644
--- a/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp
+++ b/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp
@@ -353,7 +353,7 @@ void tst_QQmlEngineDebugService::initTestCase()
QVERIFY(ok);
QTRY_VERIFY(QQmlDebugService::hasDebuggingClient());
m_dbg = new QQmlEngineDebugClient(m_conn);
- QTRY_VERIFY(m_dbg->state() == QQmlEngineDebugClient::Enabled);
+ QTRY_COMPARE(m_dbg->state(), QQmlEngineDebugClient::Enabled);
}
void tst_QQmlEngineDebugService::cleanupTestCase()
@@ -374,7 +374,7 @@ void tst_QQmlEngineDebugService::setMethodBody()
QVariant rv;
QVERIFY(QMetaObject::invokeMethod(root, "myMethodNoArgs", Qt::DirectConnection,
Q_RETURN_ARG(QVariant, rv)));
- QVERIFY(rv == QVariant(qreal(3)));
+ QCOMPARE(rv, QVariant(qreal(3)));
QVERIFY(m_dbg->setMethodBody(obj.debugId, "myMethodNoArgs", "return 7",
@@ -384,7 +384,7 @@ void tst_QQmlEngineDebugService::setMethodBody()
QVERIFY(QMetaObject::invokeMethod(root, "myMethodNoArgs", Qt::DirectConnection,
Q_RETURN_ARG(QVariant, rv)));
- QVERIFY(rv == QVariant(qreal(7)));
+ QCOMPARE(rv, QVariant(qreal(7)));
}
// With args
@@ -392,7 +392,7 @@ void tst_QQmlEngineDebugService::setMethodBody()
QVariant rv;
QVERIFY(QMetaObject::invokeMethod(root, "myMethod", Qt::DirectConnection,
Q_RETURN_ARG(QVariant, rv), Q_ARG(QVariant, QVariant(19))));
- QVERIFY(rv == QVariant(qreal(28)));
+ QCOMPARE(rv, QVariant(qreal(28)));
QVERIFY(m_dbg->setMethodBody(obj.debugId, "myMethod", "return a + 7",
&success));
@@ -401,7 +401,7 @@ void tst_QQmlEngineDebugService::setMethodBody()
QVERIFY(QMetaObject::invokeMethod(root, "myMethod", Qt::DirectConnection,
Q_RETURN_ARG(QVariant, rv), Q_ARG(QVariant, QVariant(19))));
- QVERIFY(rv == QVariant(qreal(26)));
+ QCOMPARE(rv, QVariant(qreal(26)));
}
}
@@ -733,7 +733,7 @@ void tst_QQmlEngineDebugService::queryObjectsForLocation()
QVERIFY(success);
QVERIFY(QQmlDebugTest::waitForSignal(m_dbg, SIGNAL(result())));
- QVERIFY(m_dbg->objects().count() == 1);
+ QCOMPARE(m_dbg->objects().count(), 1);
QmlDebugObjectReference obj = m_dbg->objects().first();
// check source as defined in main()