diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2012-02-13 14:35:46 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-13 06:28:20 +0100 |
commit | 0d74c7193a26da48a60653ecf1942f5b287fce08 (patch) | |
tree | e4dd3b976dcffcb3f4fef6315c99af4a91e6896a | |
parent | 1ee21da63e3d6091a6c31d05af3268c5d0cccca0 (diff) |
Remove duplicates definitions of QTRY_VERIFY and QTRY_COMPARE.
These definitions were already ignored due to #ifndef directives
surrounding them, so presumably the differences in timeout values
between these definitions and those in testlib are acceptable.
Change-Id: Ib860fc1ed27ef0690e619ffeed516f7417ae4cd0
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
-rw-r--r-- | tests/auto/integration/qcamerabackend/tst_qcamerabackend.cpp | 32 | ||||
-rw-r--r-- | tests/auto/unit/qwavedecoder/tst_qwavedecoder.cpp | 16 |
2 files changed, 0 insertions, 48 deletions
diff --git a/tests/auto/integration/qcamerabackend/tst_qcamerabackend.cpp b/tests/auto/integration/qcamerabackend/tst_qcamerabackend.cpp index cbf495258..d5e172224 100644 --- a/tests/auto/integration/qcamerabackend/tst_qcamerabackend.cpp +++ b/tests/auto/integration/qcamerabackend/tst_qcamerabackend.cpp @@ -64,38 +64,6 @@ QT_USE_NAMESPACE -// Eventually these will make it into qtestcase.h -// but we might need to tweak the timeout values here. -#ifndef QTRY_COMPARE -#define QTRY_COMPARE(__expr, __expected) \ - do { \ - const int __step = 50; \ - const int __timeout = 10000; \ - if ((__expr) != (__expected)) { \ - QTest::qWait(0); \ - } \ - for (int __i = 0; __i < __timeout && ((__expr) != (__expected)); __i+=__step) { \ - QTest::qWait(__step); \ - } \ - QCOMPARE(__expr, __expected); \ - } while(0) -#endif - -#ifndef QTRY_VERIFY -#define QTRY_VERIFY(__expr) \ - do { \ - const int __step = 50; \ - const int __timeout = 10000; \ - if (!(__expr)) { \ - QTest::qWait(0); \ - } \ - for (int __i = 0; __i < __timeout && !(__expr); __i+=__step) { \ - QTest::qWait(__step); \ - } \ - QVERIFY(__expr); \ - } while(0) -#endif - /* This is the backend conformance test. diff --git a/tests/auto/unit/qwavedecoder/tst_qwavedecoder.cpp b/tests/auto/unit/qwavedecoder/tst_qwavedecoder.cpp index bec391927..80f88183d 100644 --- a/tests/auto/unit/qwavedecoder/tst_qwavedecoder.cpp +++ b/tests/auto/unit/qwavedecoder/tst_qwavedecoder.cpp @@ -48,22 +48,6 @@ #include <QNetworkRequest> #include <QNetworkReply> -#ifndef QTRY_COMPARE -#define QTRY_COMPARE(__expr, __expected) \ - do { \ - const int __step = 50; \ - const int __timeout = 1000; \ - if (!(__expr)) { \ - QTest::qWait(0); \ - } \ - for (int __i = 0; __i < __timeout && !((__expr) == (__expected)); __i+=__step) { \ - QTest::qWait(__step); \ - } \ - QCOMPARE(__expr, __expected); \ - } while (0) -#endif - - class tst_QWaveDecoder : public QObject { Q_OBJECT |