Use the GMock portability header
authorChristopher Dykes <cdykes@fb.com>
Sat, 10 Sep 2016 00:44:00 +0000 (17:44 -0700)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Sat, 10 Sep 2016 00:56:03 +0000 (17:56 -0700)
Summary:
Switch all of the uses of <gmock/gmock.h> to <folly/portability/GMock.h>.

This is painful but necessary to get the tests to compile nicely under MSVC.

Reviewed By: yfeldblum

Differential Revision: D3837529

fbshipit-source-id: 7221dfea8f2a880919690b5b0601ca91642991ae

13 files changed:
folly/io/async/test/AsyncSSLSocketTest.cpp
folly/io/async/test/AsyncSSLSocketWriteTest.cpp
folly/io/async/test/AsyncSocketTest2.cpp
folly/io/async/test/EventHandlerTest.cpp
folly/io/async/test/MockAsyncSSLSocket.h
folly/io/async/test/MockAsyncServerSocket.h
folly/io/async/test/MockAsyncSocket.h
folly/io/async/test/MockAsyncTransport.h
folly/io/async/test/MockAsyncUDPSocket.h
folly/io/async/test/MockTimeoutManager.h
folly/io/async/test/WriteChainAsyncTransportWrapperTest.cpp
folly/test/MemoryIdlerTest.cpp
folly/test/SingletonTest.cpp

index 1622dcabb3df8881d95b0b8ed5a7bc5a0098d836..e5dbed11e1ff90bc2c49e710c07a9c9dbd76c2da 100644 (file)
@@ -21,6 +21,7 @@
 #include <folly/SocketAddress.h>
 #include <folly/io/async/AsyncSSLSocket.h>
 #include <folly/io/async/EventBase.h>
+#include <folly/portability/GMock.h>
 #include <folly/portability/Sockets.h>
 #include <folly/portability/Unistd.h>
 
@@ -37,8 +38,6 @@
 #include <set>
 #include <thread>
 
-#include <gmock/gmock.h>
-
 using std::string;
 using std::vector;
 using std::min;
index 468cf093f9586202fa2af7730cbd46319c1f8fe1..13270a69ab44533b81ed4eec749f912613c3bd5b 100644 (file)
@@ -18,9 +18,9 @@
 #include <folly/io/async/AsyncSSLSocket.h>
 #include <folly/io/async/AsyncSocket.h>
 #include <folly/io/async/EventBase.h>
+#include <folly/portability/GMock.h>
 
 #include <gtest/gtest.h>
-#include <gmock/gmock.h>
 #include <string>
 #include <vector>
 
index 4fa0a02ea37d9172259d5dd4b820e3e8c28e50c4..bc27b24141f9f9716032c97830f53426014bf80e 100644 (file)
 #include <folly/io/IOBuf.h>
 #include <folly/io/async/test/AsyncSocketTest.h>
 #include <folly/io/async/test/Util.h>
+#include <folly/portability/GMock.h>
 #include <folly/portability/Sockets.h>
 #include <folly/portability/Unistd.h>
 #include <folly/test/SocketAddressTestHelper.h>
 
 #include <boost/scoped_array.hpp>
 #include <fcntl.h>
-#include <gmock/gmock.h>
 #include <gtest/gtest.h>
 #include <sys/types.h>
 #include <iostream>
index 9b89724e44e89aa1796ea3572eeb6470ef69b190..255f2140183845862972d1b9eae2e8d1cfd2af91 100644 (file)
@@ -22,8 +22,8 @@
 #include <folly/ScopeGuard.h>
 #include <folly/io/async/EventBase.h>
 #include <folly/io/async/EventHandler.h>
+#include <folly/portability/GMock.h>
 #include <folly/portability/Sockets.h>
-#include <gmock/gmock.h>
 #include <gtest/gtest.h>
 #include <sys/eventfd.h>
 
index decf4b819cd128645c84abdfa5dd1b9446a5f39c..699fa42fee33a80f7372a3d4ac59670f445189c9 100644 (file)
@@ -14,9 +14,9 @@
  * limitations under the License.
  */
 #pragma once
-#include <gmock/gmock.h>
 
 #include <folly/io/async/AsyncSSLSocket.h>
+#include <folly/portability/GMock.h>
 
 namespace folly { namespace test {
 
index c0956c094159ef586deaede9468ec5f8ecf08d82..29156ad17e8fee0c57c790aba43fb8d582f3ef5d 100644 (file)
  */
 #pragma once
 
-#include <gmock/gmock.h>
-
 #include <folly/io/async/AsyncServerSocket.h>
 #include <folly/io/async/EventBase.h>
+#include <folly/portability/GMock.h>
 
 namespace folly {
 
index 32c692ad6e3c6a210c61d993d34e47bb466f7535..d8f58409b4041f5277c6122c88da41ba492d1516 100644 (file)
  */
 #pragma once
 
-#include <gmock/gmock.h>
-
 #include <folly/io/async/AsyncSocket.h>
 #include <folly/io/async/EventBase.h>
+#include <folly/portability/GMock.h>
 
 namespace folly {
 
index 9703f34f54d38e5e5a437e86fc847896ac31b897..80f5022b30db176d88db1727ce91f9caa788510b 100644 (file)
  */
 #pragma once
 
-#include <gmock/gmock.h>
-
 #include <folly/Memory.h>
 #include <folly/io/async/AsyncTransport.h>
+#include <folly/portability/GMock.h>
 
 namespace folly { namespace test {
 
index 267b2113163e4005d5b8836eb0dc8c10ceaa4756..8a9c204dbea1db79d5cf2df45a4258b3cdcda337 100644 (file)
@@ -15,9 +15,8 @@
  */
 #pragma once
 
-#include <gmock/gmock.h>
-
 #include <folly/io/async/AsyncUDPSocket.h>
+#include <folly/portability/GMock.h>
 
 namespace folly { namespace test {
 
index 686aa3f741730fe2319b5b9ad75ec4296304b1d8..2c27c664b004391ea4e054901829fa7285890074 100644 (file)
@@ -16,8 +16,9 @@
 #pragma once
 
 #include <folly/io/async/TimeoutManager.h>
+#include <folly/portability/GMock.h>
+
 #include <chrono>
-#include <gmock/gmock.h>
 
 namespace folly {
 namespace test {
index 6f8bbc7bfff20652d8f00039505acedc8e134fe7..0baac5186781611b2346ff3c67f17b0f9da5cc00 100644 (file)
  * limitations under the License.
  */
 #include <gtest/gtest.h>
-#include <gmock/gmock.h>
 
 #include <folly/io/async/AsyncTransport.h>
 #include <folly/io/async/WriteChainAsyncTransportWrapper.h>
+#include <folly/portability/GMock.h>
 
 using namespace testing;
 using testing::_;
index bcf3fd6ccdd4f0d8fd2b343464f94ecc67ecba08..d1536d0bebd69151c4359fff9155d8f096ae4864 100644 (file)
@@ -17,6 +17,7 @@
 #include <folly/detail/MemoryIdler.h>
 
 #include <folly/Baton.h>
+#include <folly/portability/GMock.h>
 #include <folly/portability/Windows.h>
 
 #include <memory>
@@ -24,7 +25,6 @@
 #include <assert.h>
 #include <semaphore.h>
 
-#include <gmock/gmock.h>
 #include <gtest/gtest.h>
 
 using namespace folly;
index 42d5bf7d697286aec8d180b70f814f335c04d5c1..627c954741c92b4ae53984c97cb19c8dd8e8a472 100644 (file)
 #include <folly/Subprocess.h>
 #include <folly/experimental/io/FsUtil.h>
 #include <folly/io/async/EventBase.h>
+#include <folly/portability/GMock.h>
 #include <folly/test/SingletonTestStructs.h>
 
 #include <glog/logging.h>
-#include <gmock/gmock.h>
 #include <gtest/gtest.h>
 #include <boost/thread/barrier.hpp>