aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@digia.com>2014-01-30 18:21:18 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-31 10:10:59 +0100
commitb8eaedb0dcf0daeae55fd2c2c6e31588c43613bf (patch)
treedf77f810c05a0d435c6cf7617159fece1f02a5d5 /tests
parent539d5376bb3ef18d0c819ab9a1c195ee6e56ed79 (diff)
Be stricter about the number of messages when testing profiler service
It's better to fail a test than to crash on invalid array access later. Change-Id: Ia3d24218eba80f362908979720657312c8c6cd67 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
index a122846220..14a6178b09 100644
--- a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
+++ b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
@@ -413,7 +413,7 @@ void tst_QQmlProfilerService::pixmapCacheData()
m_client->setTraceState(false);
QVERIFY2(QQmlDebugTest::waitForSignal(m_client, SIGNAL(complete())), "No trace received in time.");
- QVERIFY(m_client->traceMessages.count());
+ QVERIFY(m_client->traceMessages.count() >= 20);
// must start with "StartTrace"
QCOMPARE(m_client->traceMessages.first().messageType, (int)QQmlProfilerClient::Event);
@@ -486,6 +486,7 @@ void tst_QQmlProfilerService::profileOnExit()
m_client->setTraceState(true);
QVERIFY2(QQmlDebugTest::waitForSignal(m_client, SIGNAL(complete())), "No trace received in time.");
+ QVERIFY(m_client->traceMessages.count() >= 2);
// must start with "StartTrace"
QCOMPARE(m_client->traceMessages.first().messageType, (int)QQmlProfilerClient::Event);
@@ -504,6 +505,7 @@ void tst_QQmlProfilerService::controlFromJS()
m_client->setTraceState(false);
QVERIFY2(QQmlDebugTest::waitForSignal(m_client, SIGNAL(complete())), "No trace received in time.");
+ QVERIFY(m_client->traceMessages.count() >= 2);
// must start with "StartTrace"
QCOMPARE(m_client->traceMessages.first().messageType, (int)QQmlProfilerClient::Event);
@@ -526,6 +528,7 @@ void tst_QQmlProfilerService::signalSourceLocation()
m_client->setTraceState(false);
QVERIFY2(QQmlDebugTest::waitForSignal(m_client, SIGNAL(complete())), "No trace received in time.");
+ QVERIFY(m_client->traceMessages.count() >= 17);
// must start with "StartTrace"
QCOMPARE(m_client->traceMessages.first().messageType, (int)QQmlProfilerClient::Event);
QCOMPARE(m_client->traceMessages.first().detailType, (int)QQmlProfilerClient::StartTrace);