summaryrefslogtreecommitdiff
path: root/tests/auto/qbearertestcommon.h
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-03-01 17:45:35 +1000
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-03-02 15:42:32 +1000
commitd042a00b5828961e1e1fa82017717b5f72dde9ef (patch)
tree600353f03174c0bfe80d964c5a6d2500e5df235d /tests/auto/qbearertestcommon.h
parentef30a6f336d55c813423bf139d8363f50181179f (diff)
downloadqt4-tools-d042a00b5828961e1e1fa82017717b5f72dde9ef.tar.gz
Bearer management changes from Qt Mobility (fca9891).
fca98911b75ce12e70d93cfc2932a9759758a605
Diffstat (limited to 'tests/auto/qbearertestcommon.h')
-rw-r--r--tests/auto/qbearertestcommon.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qbearertestcommon.h b/tests/auto/qbearertestcommon.h
index 0bfe622041..c9df249afe 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 { \