diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2009-06-05 08:54:09 +1000 |
---|---|---|
committer | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2009-06-05 12:11:55 +1000 |
commit | 4046816cd22d0c3f5ccc59f3202d83180d95729d (patch) | |
tree | adf0d4678e974149c968beb22ac46927e9847ab3 /tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp | |
parent | e12a384e55174fb6ecd861fc1272a4a38cb4ed93 (diff) |
Move QTRY_VERIFY and QTRY_COMPARE to common header.
Diffstat (limited to 'tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp')
-rw-r--r-- | tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp b/tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp index 6946fa84d7..aedf08d11f 100644 --- a/tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp +++ b/tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp @@ -39,38 +39,10 @@ ** ****************************************************************************/ #include <QtTest/QtTest> +#include "../qbearertestcommon.h" #include "qnetworkconfiguration.h" #include "qnetworkconfigmanager.h" -// Will try to wait for the condition while allowing event processing -#define QTRY_VERIFY(__expr) \ - do { \ - const int __step = 50; \ - const int __timeout = 20000; \ - if (!(__expr)) { \ - QTest::qWait(0); \ - } \ - for (int __i = 0; __i < __timeout && !(__expr); __i+=__step) { \ - QTest::qWait(__step); \ - } \ - QVERIFY(__expr); \ - } while(0) - -// 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) - - class tst_QNetworkConfigurationManager : public QObject { Q_OBJECT |