Index: webrtc/base/gunit.h |
diff --git a/webrtc/base/gunit.h b/webrtc/base/gunit.h |
index b087badd94ab5cbd64803db680b4026fcdbec444..c3e853458c87558549869f44c21deba51501d57d 100644 |
--- a/webrtc/base/gunit.h |
+++ b/webrtc/base/gunit.h |
@@ -92,23 +92,23 @@ |
// Wait until "ex" is true, or "timeout" expires, using fake clock where |
// messages are processed every millisecond. |
-#define SIMULATED_WAIT(ex, timeout, clock) \ |
- for (int64_t start = rtc::TimeMillis(); \ |
- !(ex) && rtc::TimeMillis() < start + (timeout);) { \ |
- clock.AdvanceTime(rtc::TimeDelta::FromMilliseconds(1)); \ |
+#define SIMULATED_WAIT(ex, timeout, clock) \ |
+ for (int64_t start = rtc::TimeMillis(); \ |
+ !(ex) && rtc::TimeMillis() < start + (timeout);) { \ |
+ (clock).AdvanceTime(rtc::TimeDelta::FromMilliseconds(1)); \ |
} |
// This returns the result of the test in res, so that we don't re-evaluate |
// the expression in the XXXX_WAIT macros below, since that causes problems |
// when the expression is only true the first time you check it. |
-#define SIMULATED_WAIT_(ex, timeout, res, clock) \ |
- do { \ |
- int64_t start = rtc::TimeMillis(); \ |
- res = (ex); \ |
- while (!res && rtc::TimeMillis() < start + (timeout)) { \ |
- clock.AdvanceTime(rtc::TimeDelta::FromMilliseconds(1)); \ |
- res = (ex); \ |
- } \ |
+#define SIMULATED_WAIT_(ex, timeout, res, clock) \ |
+ do { \ |
+ int64_t start = rtc::TimeMillis(); \ |
+ res = (ex); \ |
+ while (!res && rtc::TimeMillis() < start + (timeout)) { \ |
+ (clock).AdvanceTime(rtc::TimeDelta::FromMilliseconds(1)); \ |
+ res = (ex); \ |
+ } \ |
} while (0) |
// The typical EXPECT_XXXX, but done until true or a timeout with a fake clock. |