diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-12-06 17:10:25 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-06 08:40:25 +0100 |
commit | 0811215f40d025d723dc54fd30f4a4d402b5a036 (patch) | |
tree | e4d3a4139ea3bbffc6a7c1e7c050960ddad38b9d | |
parent | 090e3efaeb64b3caf078e7473230f1249bd1e083 (diff) |
Remove duplicates of QTRY_VERIFY and QTRY_COMPARE.
These macros are now provided by testlib via the QtTest/QtTest header.
Change-Id: I6b499395888268aab315d63404e2b0eed8688615
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
-rw-r--r-- | tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp | 33 | ||||
-rw-r--r-- | tests/auto/unit/qmediaplayer/tst_qmediaplayer.cpp | 31 |
2 files changed, 0 insertions, 64 deletions
diff --git a/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp b/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp index 29e70c24d..abcc3ec39 100644 --- a/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp +++ b/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp @@ -52,39 +52,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 = 5000; \ - 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 = 5000; \ - if (!(__expr)) { \ - QTest::qWait(0); \ - } \ - for (int __i = 0; __i < __timeout && !(__expr); __i+=__step) { \ - QTest::qWait(__step); \ - } \ - QVERIFY(__expr); \ - } while(0) -#endif - - #define QTRY_WAIT(code, __expr) \ do { \ const int __step = 50; \ diff --git a/tests/auto/unit/qmediaplayer/tst_qmediaplayer.cpp b/tests/auto/unit/qmediaplayer/tst_qmediaplayer.cpp index fd1b15a9f..b902d3cfb 100644 --- a/tests/auto/unit/qmediaplayer/tst_qmediaplayer.cpp +++ b/tests/auto/unit/qmediaplayer/tst_qmediaplayer.cpp @@ -61,37 +61,6 @@ #include "mockmediaplayerservice.h" #include "mockvideosurface.h" -// Encouraging successful diversity through copy and paste. -#ifndef QTRY_COMPARE -#define QTRY_COMPARE(__expr, __expected) \ - do { \ - const int __step = 50; \ - const int __timeout = 5000; \ - 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 = 5000; \ - if (!(__expr)) { \ - QTest::qWait(0); \ - } \ - for (int __i = 0; __i < __timeout && !(__expr); __i+=__step) { \ - QTest::qWait(__step); \ - } \ - QVERIFY(__expr); \ - } while(0) -#endif - QT_USE_NAMESPACE class AutoConnection |