diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-10-29 08:37:26 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-10-29 08:37:26 (GMT) |
commit | 25502811723a026a38c0a861a6a304d24b8e6a95 (patch) | |
tree | 553e0cbaba99b51db3940f47414719a505e8d529 /tests/auto | |
parent | df37b2e9023bc2cebe00c77be6040019cfdc24b6 (diff) | |
download | Qt-25502811723a026a38c0a861a6a304d24b8e6a95.zip Qt-25502811723a026a38c0a861a6a304d24b8e6a95.tar.gz Qt-25502811723a026a38c0a861a6a304d24b8e6a95.tar.bz2 |
Stabilize tests
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 2 | ||||
-rw-r--r-- | tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp | 4 | ||||
-rw-r--r-- | tests/auto/qtreeview/tst_qtreeview.cpp | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index 2c948cc..28f249f 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -7463,7 +7463,7 @@ void tst_QGraphicsItem::moveLineItem() // Make sure the calculated region is correct. item->update(); QTest::qWait(10); - QCOMPARE(view.paintedRegion, expectedRegion); + QTRY_COMPARE(view.paintedRegion, expectedRegion); view.reset(); // Old position: (50, 50) diff --git a/tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp b/tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp index 9dfd486..7d98748 100644 --- a/tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp +++ b/tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp @@ -45,6 +45,8 @@ #include <private/qgraphicsscenebsptreeindex_p.h> #include <private/qgraphicssceneindex_p.h> #include <private/qgraphicsscenelinearindex_p.h> +#include "../../shared/util.h" + //TESTED_CLASS= //TESTED_FILES= @@ -356,7 +358,7 @@ void tst_QGraphicsSceneIndex::clear() MyItem *item = new MyItem; scene.addItem(item); qApp->processEvents(); - QCOMPARE(item->numPaints, 1); + QTRY_COMPARE(item->numPaints, 1); } QTEST_MAIN(tst_QGraphicsSceneIndex) diff --git a/tests/auto/qtreeview/tst_qtreeview.cpp b/tests/auto/qtreeview/tst_qtreeview.cpp index 1429771..75c02e9 100644 --- a/tests/auto/qtreeview/tst_qtreeview.cpp +++ b/tests/auto/qtreeview/tst_qtreeview.cpp @@ -3552,6 +3552,7 @@ void tst_QTreeView::doubleClickedWithSpans() view.setModel(&model); view.setFirstColumnSpanned(0, QModelIndex(), true); view.show(); + QTest::qWaitForWindowShown(&view); QPoint p(10, 10); QCOMPARE(view.indexAt(p), model.index(0, 0)); |