summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeanimatedimage
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2010-09-10 07:33:23 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2010-09-10 07:33:23 (GMT)
commit003d09ab22f4d53995efc2d390c451e60afbe8c9 (patch)
tree3d19e4959d0b035a2e2ec5e63c0b41a278c958df /tests/auto/declarative/qdeclarativeanimatedimage
parent4c62387c530787b0db8b159b8a535401a5bb7310 (diff)
downloadQt-003d09ab22f4d53995efc2d390c451e60afbe8c9.zip
Qt-003d09ab22f4d53995efc2d390c451e60afbe8c9.tar.gz
Qt-003d09ab22f4d53995efc2d390c451e60afbe8c9.tar.bz2
Autotests cleanup.
Diffstat (limited to 'tests/auto/declarative/qdeclarativeanimatedimage')
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp b/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp
index 1001278..da15a85 100644
--- a/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp
@@ -47,22 +47,13 @@
#include <private/qdeclarativeanimatedimage_p.h>
#include "../shared/testhttpserver.h"
+#include "../../../shared/util.h"
#ifdef Q_OS_SYMBIAN
// In Symbian OS test data is located in applications private dir
#define SRCDIR "."
#endif
-#define TRY_WAIT(expr) \
- do { \
- for (int ii = 0; ii < 6; ++ii) { \
- if ((expr)) break; \
- QTest::qWait(50); \
- } \
- QVERIFY((expr)); \
- } while (false)
-
-
class tst_qdeclarativeanimatedimage : public QObject
{
Q_OBJECT
@@ -152,14 +143,14 @@ void tst_qdeclarativeanimatedimage::remote()
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine, QUrl("http://127.0.0.1:14449/" + fileName));
- TRY_WAIT(component.isReady());
+ QTRY_VERIFY(component.isReady());
QDeclarativeAnimatedImage *anim = qobject_cast<QDeclarativeAnimatedImage *>(component.create());
QVERIFY(anim);
- TRY_WAIT(anim->isPlaying());
+ QTRY_VERIFY(anim->isPlaying());
if (paused) {
- TRY_WAIT(anim->isPaused());
+ QTRY_VERIFY(anim->isPaused());
QCOMPARE(anim->currentFrame(), 2);
}
QVERIFY(anim->status() != QDeclarativeAnimatedImage::Error);