Remove redundant copies of QTRY_COMPARE.
authorJason McDonald <jason.mcdonald@nokia.com>
Mon, 7 Nov 2011 04:47:59 +0000 (14:47 +1000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 9 Nov 2011 00:09:27 +0000 (01:09 +0100)
QTRY_COMPARE is now part of qtestlib, so there's no need for copies of
it.

Change-Id: Ied4e7d3b30c1cf16ddcbf8655e4d976e74c2bd8a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
tests/auto/corelib/statemachine/qstate/tst_qstate.cpp
tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp

index 9950f85..59170cf 100644 (file)
 #include "qstatemachine.h"
 #include "qsignaltransition.h"
 
-// Will try to wait for the condition while allowing event processing
-#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)
-
 //TESTED_CLASS=
 //TESTED_FILES=
 
index c379504..5b9e078 100644 (file)
 #include "private/qstate_p.h"
 #include "private/qstatemachine_p.h"
 
-// Will try to wait for the condition while allowing event processing
-#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)
-
 //TESTED_CLASS=
 //TESTED_FILES=