From e8012b0405c81f93ddae1410957a0d60f6e7a1a3 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Mon, 18 Aug 2014 15:41:41 +0200 Subject: [PATCH] Remove some manual qWait and use QTRY_VERIFY instead. This takes 300ms off the total time for this test. Change-Id: I230b8a58315797a81579f6a07da282b0dc40637d Reviewed-by: Joerg Bornemann --- .../text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp b/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp index 5484c9ed93..d31148180d 100644 --- a/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp +++ b/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp @@ -288,8 +288,7 @@ void tst_QSyntaxHighlighter::highlightOnInit() cursor.insertText("World"); TestHighlighter *hl = new TestHighlighter(doc); - QTest::qWait(100); - QVERIFY(hl->highlighted); + QTRY_VERIFY(hl->highlighted); } class StateTestHighlighter : public QSyntaxHighlighter @@ -328,8 +327,7 @@ void tst_QSyntaxHighlighter::stopHighlightingWhenStateDoesNotChange() cursor.insertText("changestate"); StateTestHighlighter *hl = new StateTestHighlighter(doc); - QTest::qWait(100); - QVERIFY(hl->highlighted); + QTRY_VERIFY(hl->highlighted); hl->reset(); @@ -488,8 +486,7 @@ void tst_QSyntaxHighlighter::avoidUnnecessaryRehighlight() QVERIFY(hl->highlighted); hl->highlighted = false; - QTest::qWait(100); - QVERIFY(!hl->highlighted); + QTRY_VERIFY(!hl->highlighted); } void tst_QSyntaxHighlighter::noContentsChangedDuringHighlight()