Bug 996238 - Reformat gtest_utils.h. r=ekr
☠☠ backed out by f3d44e807d1b ☠ ☠
authorMartin Thomson <martin.thomson@gmail.com>
Tue, 31 Mar 2015 16:01:51 -0700
changeset 237041 3fce22efb76eb6777a2cc4731fec695244962e16
parent 237022 41074e335e9f1ecc49c639d4bf0c18c3d34df2c7
child 237042 9ee10cfc0489ed25c23412bf68b3addc9a829aec
push id28523
push userkwierso@gmail.com
push dateThu, 02 Apr 2015 00:55:14 +0000
treeherdermozilla-central@37ddc5e2eb72 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersekr
bugs996238
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 996238 - Reformat gtest_utils.h. r=ekr
media/mtransport/test/gtest_utils.h
--- a/media/mtransport/test/gtest_utils.h
+++ b/media/mtransport/test/gtest_utils.h
@@ -46,41 +46,41 @@
 #include "prthread.h"
 
 #define GTEST_HAS_RTTI 0
 #include "gtest/gtest.h"
 
 // Wait up to timeout seconds for expression to be true
 #define WAIT(expression, timeout) \
   do { \
-  for (PRIntervalTime start = PR_IntervalNow(); !(expression) &&        \
-           ! ((PR_IntervalNow() - start) > PR_MillisecondsToInterval(timeout));) \
-    PR_Sleep(10); \
+    for (PRIntervalTime start = PR_IntervalNow(); !(expression) && \
+           ! ((PR_IntervalNow() - start) > PR_MillisecondsToInterval(timeout));) { \
+      PR_Sleep(10); \
+    } \
   } while(0)
 
 // Same as GTEST_WAIT, but stores the result in res. Used when
 // you also want the result of expression but wish to avoid
 // double evaluation.
-#define WAIT_(expression, timeout, res)                      \
+#define WAIT_(expression, timeout, res) \
   do { \
-  for (PRIntervalTime start = PR_IntervalNow(); !(res = (expression)) && \
-           ! ((PR_IntervalNow() - start) > PR_MillisecondsToInterval(timeout));) \
-    PR_Sleep(10); \
+    for (PRIntervalTime start = PR_IntervalNow(); !(res = (expression)) && \
+           ! ((PR_IntervalNow() - start) > PR_MillisecondsToInterval(timeout));) { \
+      PR_Sleep(10); \
+    } \
   } while(0)
 
 #define ASSERT_TRUE_WAIT(expression, timeout) \
   do { \
-  bool res; \
-  WAIT_(expression, timeout, res); \
-  ASSERT_TRUE(res); \
-  } while(0);
+    bool res; \
+    WAIT_(expression, timeout, res); \
+    ASSERT_TRUE(res); \
+  } while(0)
 
 #define EXPECT_TRUE_WAIT(expression, timeout) \
   do { \
-  bool res; \
-  WAIT_(expression, timeout, res); \
-  EXPECT_TRUE(res); \
-  } while(0);
+    bool res; \
+    WAIT_(expression, timeout, res); \
+    EXPECT_TRUE(res); \
+  } while(0)
+
 
 #endif
-
-
-