Fix some copyright lines in folly/detail/ and folly/test/
[folly.git] / folly / test / DeterministicScheduleTest.cpp
index bdf7ebcbe85a37f4dfda0b74c886d21c3990fb43..a5a800cb3b4333283c23c924ccda98647754c1bd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2013-present Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -104,7 +104,7 @@ TEST(DeterministicSchedule, buggyAdd) {
       }
     }
   } // for bug
-} // TEST
+}
 
 /// Test DSched support for auxiliary data and global invariants
 ///
@@ -234,17 +234,17 @@ DEFINE_bool(bug, false, "Introduce bug");
 
 /** Macro for inline definition of auxiliary actions */
 #define AUX_ACT(act)                          \
-  {                                           \
+  do {                                        \
     AUX_THR(func_) = __func__;                \
     AUX_THR(line_) = __LINE__;                \
     AuxAct auxfn(                             \
       [&](bool success) {                     \
-        if (success);                         \
+        if (success) {}                       \
         if (true) {act}                       \
       }                                       \
     );                                        \
     DeterministicSchedule::setAuxAct(auxfn);  \
-  }
+  } while (0)
 
 /** Alias for original class */
 template <typename T>
@@ -316,7 +316,7 @@ struct AnnotatedAtomicCounter : public Base<T> {
   }
 
   /* Constructor -- calls original constructor */
-  AnnotatedAtomicCounter(int val) : Base<T>(val) {}
+  explicit AnnotatedAtomicCounter(int val) : Base<T>(val) {}
 
   /* Overloads of original member functions (as needed) */