diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-03-01 07:45:35 (GMT) |
---|---|---|
committer | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-03-02 05:42:32 (GMT) |
commit | d042a00b5828961e1e1fa82017717b5f72dde9ef (patch) | |
tree | 600353f03174c0bfe80d964c5a6d2500e5df235d /tests/auto/qbearertestcommon.h | |
parent | ef30a6f336d55c813423bf139d8363f50181179f (diff) | |
download | Qt-d042a00b5828961e1e1fa82017717b5f72dde9ef.zip Qt-d042a00b5828961e1e1fa82017717b5f72dde9ef.tar.gz Qt-d042a00b5828961e1e1fa82017717b5f72dde9ef.tar.bz2 |
Bearer management changes from Qt Mobility (fca9891).
fca98911b75ce12e70d93cfc2932a9759758a605
Diffstat (limited to 'tests/auto/qbearertestcommon.h')
-rw-r--r-- | tests/auto/qbearertestcommon.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qbearertestcommon.h b/tests/auto/qbearertestcommon.h index 0bfe622..c9df249 100644 --- a/tests/auto/qbearertestcommon.h +++ b/tests/auto/qbearertestcommon.h @@ -42,6 +42,19 @@ #ifndef QBEARERTESTCOMMON_H #define QBEARERTESTCOMMON_H +// Wait for __expr to happen, while still allowing events to be processed. +#define QTRY_NOOP(__expr) \ + do { \ + const int __step = 50; \ + const int __timeout = 15000; \ + if (!(__expr)) { \ + QTest::qWait(0); \ + } \ + for (int __i = 0; __i < __timeout && !(__expr); __i+=__step) { \ + QTest::qWait(__step); \ + } \ + } while(0) + // Will try to wait for the condition while allowing event processing #define QTRY_VERIFY(__expr) \ do { \ |