Include the correct headers in various tests
authorChristopher Dykes <cdykes@fb.com>
Sat, 2 Jul 2016 04:33:07 +0000 (21:33 -0700)
committerFacebook Github Bot 2 <facebook-github-bot-2-bot@fb.com>
Sat, 2 Jul 2016 04:38:34 +0000 (21:38 -0700)
Summary: There are two types of includes this adds. The first are standard library headers that weer previously included by transitive dependencies, but aren't included under MSVC, so need to be explicitly included. The second type is a couple of portability headers.

Reviewed By: yfeldblum

Differential Revision: D3513196

fbshipit-source-id: 4f2ac1207aee887ba41c19f5490003e5fe4088f4

12 files changed:
folly/experimental/TestUtil.cpp
folly/experimental/test/TestUtilTest.cpp
folly/futures/test/CollectTest.cpp
folly/io/async/test/SocketPair.cpp
folly/io/async/test/TimeUtil.h
folly/test/AtomicLinkedListTest.cpp
folly/test/FutexTest.cpp
folly/test/MemoryIdlerTest.cpp
folly/test/SmallLocksTest.cpp
folly/test/ThreadLocalBenchmark.cpp
folly/test/TimeseriesHistogramTest.cpp
folly/test/TimeseriesTest.cpp

index dc58798271bd5748909d3c23bef5874c3bb6c2a9..9657211400c36a4182c97e6f6eb3b70d386b2f88 100644 (file)
@@ -18,7 +18,6 @@
 
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <fcntl.h>
 
 #include <boost/regex.hpp>
 #include <folly/Conv.h>
@@ -28,6 +27,7 @@
 #include <folly/Memory.h>
 #include <folly/String.h>
 #include <folly/portability/Environment.h>
+#include <folly/portability/Fcntl.h>
 #include <folly/portability/Unistd.h>
 
 namespace folly {
index 7b1eeda380c0e3c80eea72ef1fcdf532b49efb95..845d96fdae5713a4df01ac94c111c2355118a957 100644 (file)
 #include <system_error>
 
 #include <boost/algorithm/string.hpp>
-#include <folly/Memory.h>
 #include <glog/logging.h>
 #include <gtest/gtest.h>
 
+#include <folly/Memory.h>
+#include <folly/portability/Environment.h>
+
 using namespace folly;
 using namespace folly::test;
 
index 2b7ca5bba635453c318b6e3e8d11ec0c59cce8f6..5f05a0b6044933a1c6c59e906984aa69f5564286 100644 (file)
@@ -16,6 +16,8 @@
 
 #include <gtest/gtest.h>
 
+#include <numeric>
+
 #include <boost/thread/barrier.hpp>
 
 #include <folly/futures/Future.h>
index 7d0cafd1cf1a9fb6f1a7adab48c336e02088a599..e2eae1b182932ad568db147f6e84120572adfe2a 100644 (file)
 #include <folly/io/async/test/SocketPair.h>
 
 #include <folly/Conv.h>
+#include <folly/portability/Fcntl.h>
 #include <folly/portability/Sockets.h>
 #include <folly/portability/Unistd.h>
 
-#include <fcntl.h>
 #include <errno.h>
 #include <sys/types.h>
 #include <stdexcept>
index 8378a0e0d143051151e498f629126259da74fa9e..89bd42f9cc22885d06ec264ccb7d7e918a876db1 100644 (file)
@@ -18,6 +18,8 @@
 #include <chrono>
 #include <iostream>
 
+#include <folly/portability/SysTypes.h>
+
 namespace folly {
 
 class TimePoint {
index 62f3dc60492fdd71d0758cdefdf42af523741e98..0abe82c6cb93bbf2fee0a6fac56b7fdd109781f1 100644 (file)
@@ -14,6 +14,7 @@
  * limitations under the License.
  */
 
+#include <algorithm>
 #include <thread>
 
 #include <gtest/gtest.h>
index 86682c5e9b6760bd447be1c3f410548658b2323b..36d11f8e28fe9841320ea01a3325f412b1d9d1c5 100644 (file)
@@ -24,7 +24,8 @@
 
 #include <glog/logging.h>
 #include <gtest/gtest.h>
-#include <time.h>
+
+#include <folly/portability/Time.h>
 
 using namespace folly::detail;
 using namespace folly::test;
index ed4a35faffaf10b0d2dea574c3a5ae6c5c3a426e..bcf3fd6ccdd4f0d8fd2b343464f94ecc67ecba08 100644 (file)
@@ -17,6 +17,7 @@
 #include <folly/detail/MemoryIdler.h>
 
 #include <folly/Baton.h>
+#include <folly/portability/Windows.h>
 
 #include <memory>
 #include <thread>
index 5aef9ea175debcba09864226d995041e8e5a0079..41c2ce65505617e6aee06196229c125676031beb 100644 (file)
 #include <string>
 #include <vector>
 #include <pthread.h>
-#include <unistd.h>
 
 #include <thread>
 
 #include <gtest/gtest.h>
 
 #include <folly/portability/Asm.h>
+#include <folly/portability/Unistd.h>
 
 using folly::MSLGuard;
 using folly::MicroLock;
index a3ea1e537551f40937b4b3e085b1cd5a9d1a53b1..88691e13eb6fc739dedcc1ba7486df5adaba636c 100644 (file)
@@ -16,9 +16,7 @@
 
 #include <folly/ThreadLocal.h>
 
-#include <dlfcn.h>
 #include <sys/types.h>
-#include <sys/wait.h>
 
 #include <array>
 #include <atomic>
index 45bcd4162d7d3e7c77a3d3672088a95d912e2834..489c277d0db66a67c9c768570459b30ed383cd25 100644 (file)
@@ -17,6 +17,8 @@
 #include <folly/stats/TimeseriesHistogram.h>
 #include <folly/stats/TimeseriesHistogram-defs.h>
 
+#include <random>
+
 #include <gtest/gtest.h>
 
 using namespace std;
index 85ec1b8965d47738ff4b21b28e5d87e44134c147..91b2c9eef88fc17b170b45e76f79a3fc2d3ba292 100644 (file)
@@ -19,6 +19,8 @@
 #include <folly/stats/MultiLevelTimeSeries.h>
 #include <folly/stats/MultiLevelTimeSeries-defs.h>
 
+#include <array>
+
 #include <glog/logging.h>
 #include <gtest/gtest.h>