diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-05-20 04:04:04 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-05-20 04:04:04 (GMT) |
commit | c37a7442d298ccec251b9178a31b1f0c8f199676 (patch) | |
tree | 3262406681b7e6e4f70f3af1e066fd6303d9e9cf /tests | |
parent | c91a5420d119ab604c7df709fcee00ae6b1b248f (diff) | |
download | Qt-c37a7442d298ccec251b9178a31b1f0c8f199676.zip Qt-c37a7442d298ccec251b9178a31b1f0c8f199676.tar.gz Qt-c37a7442d298ccec251b9178a31b1f0c8f199676.tar.bz2 |
Make test more stable
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp b/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp index dd2f46e..b183105 100644 --- a/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp +++ b/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp @@ -45,6 +45,7 @@ #include <QtDeclarative/qdeclarativeview.h> #include <QtDeclarative/qdeclarativeitem.h> #include <QtGui/qgraphicswidget.h> +#include "../../../shared/util.h" class tst_QDeclarativeView : public QObject @@ -106,9 +107,9 @@ void tst_QDeclarativeView::resizemodedeclarativeitem() // size update from root object declarativeItem->setWidth(250); declarativeItem->setHeight(350); - qApp->processEvents(); QCOMPARE(declarativeItem->width(), 250.0); QCOMPARE(declarativeItem->height(), 350.0); + QTRY_COMPARE(canvas->size(), QSize(250, 350)); QCOMPARE(canvas->size(), QSize(250, 350)); QCOMPARE(canvas->size(), canvas->sizeHint()); QCOMPARE(sceneResizedSpy.count(), 4); @@ -134,9 +135,9 @@ void tst_QDeclarativeView::resizemodedeclarativeitem() // size update from root object declarativeItem->setWidth(80); declarativeItem->setHeight(100); - qApp->processEvents(); QCOMPARE(declarativeItem->width(), 80.0); QCOMPARE(declarativeItem->height(), 100.0); + QTRY_COMPARE(canvas->size(), QSize(80, 100)); QCOMPARE(canvas->size(), QSize(80, 100)); QCOMPARE(canvas->size(), canvas->sizeHint()); QCOMPARE(sceneResizedSpy2.count(), 2); |