diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2010-09-10 07:33:23 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2010-09-10 07:33:23 (GMT) |
commit | 003d09ab22f4d53995efc2d390c451e60afbe8c9 (patch) | |
tree | 3d19e4959d0b035a2e2ec5e63c0b41a278c958df /tests/auto/declarative/qdeclarativeecmascript | |
parent | 4c62387c530787b0db8b159b8a535401a5bb7310 (diff) | |
download | Qt-003d09ab22f4d53995efc2d390c451e60afbe8c9.zip Qt-003d09ab22f4d53995efc2d390c451e60afbe8c9.tar.gz Qt-003d09ab22f4d53995efc2d390c451e60afbe8c9.tar.bz2 |
Autotests cleanup.
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript')
-rw-r--r-- | tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index 33bf7ea..c10a110 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -52,6 +52,7 @@ #include <private/qdeclarativeglobalscriptclass_p.h> #include "testtypes.h" #include "testhttpserver.h" +#include "../../../shared/util.h" #ifdef Q_OS_SYMBIAN // In Symbian OS test data is located in applications private dir @@ -2416,15 +2417,6 @@ void tst_qdeclarativeecmascript::function() delete o; } -#define TRY_WAIT(expr) \ - do { \ - for (int ii = 0; ii < 6; ++ii) { \ - if ((expr)) break; \ - QTest::qWait(50); \ - } \ - QVERIFY((expr)); \ - } while (false) - // Test the "Qt.include" method void tst_qdeclarativeecmascript::include() { @@ -2496,8 +2488,8 @@ void tst_qdeclarativeecmascript::include() QObject *o = component.create(); QVERIFY(o != 0); - TRY_WAIT(o->property("done").toBool() == true); - TRY_WAIT(o->property("done2").toBool() == true); + QTRY_VERIFY(o->property("done").toBool() == true); + QTRY_VERIFY(o->property("done2").toBool() == true); QCOMPARE(o->property("test1").toBool(), true); QCOMPARE(o->property("test2").toBool(), true); @@ -2524,7 +2516,7 @@ void tst_qdeclarativeecmascript::include() QObject *o = component.create(); QVERIFY(o != 0); - TRY_WAIT(o->property("done").toBool() == true); + QTRY_VERIFY(o->property("done").toBool() == true); QCOMPARE(o->property("test1").toBool(), true); QCOMPARE(o->property("test2").toBool(), true); |