summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-12-06 15:37:58 +1000
committerQt by Nokia <qt-info@nokia.com>2011-12-09 06:43:39 +0100
commitf23c247fdeba172009e0b648f03328e73686c254 (patch)
tree78858adf5d3accbc11f641dd04bd3d6b645a3b2d /tests
parent00c4f75af2b71253d4fb2f6c8458f43536f7d608 (diff)
Remove duplicate definitions of QTRY_COMPARE and QTRY_VERIFY.
These macros are now provided by QTestLib via the QtTest/QtTest header. Change-Id: I60e571e9772170f6576465e19f8ac610313b537a Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qdeclarativefeedback/tst_qdeclarativefeedback.cpp16
-rw-r--r--tests/auto/qfeedbackhapticseffect/tst_qfeedbackhapticseffect.cpp31
-rw-r--r--tests/auto/qfeedbackmmk/tst_qfeedbackmmk.cpp31
-rw-r--r--tests/auto/qfeedbacknoplugins/tst_qfeedbacknoplugins.cpp15
-rw-r--r--tests/auto/qfeedbackplugin/unittest/tst_qfeedbackplugin.cpp15
5 files changed, 0 insertions, 108 deletions
diff --git a/tests/auto/qdeclarativefeedback/tst_qdeclarativefeedback.cpp b/tests/auto/qdeclarativefeedback/tst_qdeclarativefeedback.cpp
index 94fa26f..3ee6aad 100644
--- a/tests/auto/qdeclarativefeedback/tst_qdeclarativefeedback.cpp
+++ b/tests/auto/qdeclarativefeedback/tst_qdeclarativefeedback.cpp
@@ -50,22 +50,6 @@
#define SRCDIR "."
#endif
-#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
-
-
Q_DECLARE_METATYPE(QFeedbackEffect::ThemeEffect);
class tst_qdeclarativefeedback : public QObject
diff --git a/tests/auto/qfeedbackhapticseffect/tst_qfeedbackhapticseffect.cpp b/tests/auto/qfeedbackhapticseffect/tst_qfeedbackhapticseffect.cpp
index b16bf63..78e593f 100644
--- a/tests/auto/qfeedbackhapticseffect/tst_qfeedbackhapticseffect.cpp
+++ b/tests/auto/qfeedbackhapticseffect/tst_qfeedbackhapticseffect.cpp
@@ -48,37 +48,6 @@
QT_USE_NAMESPACE
-#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/qfeedbackmmk/tst_qfeedbackmmk.cpp b/tests/auto/qfeedbackmmk/tst_qfeedbackmmk.cpp
index eecf896..869f358 100644
--- a/tests/auto/qfeedbackmmk/tst_qfeedbackmmk.cpp
+++ b/tests/auto/qfeedbackmmk/tst_qfeedbackmmk.cpp
@@ -47,37 +47,6 @@
#include <qfeedbackactuator.h>
#include <QSignalSpy>
-#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/qfeedbacknoplugins/tst_qfeedbacknoplugins.cpp b/tests/auto/qfeedbacknoplugins/tst_qfeedbacknoplugins.cpp
index 2b0415c..df1ea2b 100644
--- a/tests/auto/qfeedbacknoplugins/tst_qfeedbacknoplugins.cpp
+++ b/tests/auto/qfeedbacknoplugins/tst_qfeedbacknoplugins.cpp
@@ -48,21 +48,6 @@
QT_USE_NAMESPACE
-#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
-
class tst_QFeedbackNoPlugins : public QObject
{
Q_OBJECT
diff --git a/tests/auto/qfeedbackplugin/unittest/tst_qfeedbackplugin.cpp b/tests/auto/qfeedbackplugin/unittest/tst_qfeedbackplugin.cpp
index 6bb651c..0070562 100644
--- a/tests/auto/qfeedbackplugin/unittest/tst_qfeedbackplugin.cpp
+++ b/tests/auto/qfeedbackplugin/unittest/tst_qfeedbackplugin.cpp
@@ -48,21 +48,6 @@
QT_USE_NAMESPACE
-#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
-
class tst_QFeedbackPlugin : public QObject
{
Q_OBJECT