Commit 90989a73 authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot

Use the GMock portability header

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
parent af5dbcc3
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <folly/SocketAddress.h> #include <folly/SocketAddress.h>
#include <folly/io/async/AsyncSSLSocket.h> #include <folly/io/async/AsyncSSLSocket.h>
#include <folly/io/async/EventBase.h> #include <folly/io/async/EventBase.h>
#include <folly/portability/GMock.h>
#include <folly/portability/Sockets.h> #include <folly/portability/Sockets.h>
#include <folly/portability/Unistd.h> #include <folly/portability/Unistd.h>
...@@ -37,8 +38,6 @@ ...@@ -37,8 +38,6 @@
#include <set> #include <set>
#include <thread> #include <thread>
#include <gmock/gmock.h>
using std::string; using std::string;
using std::vector; using std::vector;
using std::min; using std::min;
......
...@@ -18,9 +18,9 @@ ...@@ -18,9 +18,9 @@
#include <folly/io/async/AsyncSSLSocket.h> #include <folly/io/async/AsyncSSLSocket.h>
#include <folly/io/async/AsyncSocket.h> #include <folly/io/async/AsyncSocket.h>
#include <folly/io/async/EventBase.h> #include <folly/io/async/EventBase.h>
#include <folly/portability/GMock.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <gmock/gmock.h>
#include <string> #include <string>
#include <vector> #include <vector>
......
...@@ -25,13 +25,13 @@ ...@@ -25,13 +25,13 @@
#include <folly/io/IOBuf.h> #include <folly/io/IOBuf.h>
#include <folly/io/async/test/AsyncSocketTest.h> #include <folly/io/async/test/AsyncSocketTest.h>
#include <folly/io/async/test/Util.h> #include <folly/io/async/test/Util.h>
#include <folly/portability/GMock.h>
#include <folly/portability/Sockets.h> #include <folly/portability/Sockets.h>
#include <folly/portability/Unistd.h> #include <folly/portability/Unistd.h>
#include <folly/test/SocketAddressTestHelper.h> #include <folly/test/SocketAddressTestHelper.h>
#include <boost/scoped_array.hpp> #include <boost/scoped_array.hpp>
#include <fcntl.h> #include <fcntl.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <sys/types.h> #include <sys/types.h>
#include <iostream> #include <iostream>
......
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
#include <folly/ScopeGuard.h> #include <folly/ScopeGuard.h>
#include <folly/io/async/EventBase.h> #include <folly/io/async/EventBase.h>
#include <folly/io/async/EventHandler.h> #include <folly/io/async/EventHandler.h>
#include <folly/portability/GMock.h>
#include <folly/portability/Sockets.h> #include <folly/portability/Sockets.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <sys/eventfd.h> #include <sys/eventfd.h>
......
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
* limitations under the License. * limitations under the License.
*/ */
#pragma once #pragma once
#include <gmock/gmock.h>
#include <folly/io/async/AsyncSSLSocket.h> #include <folly/io/async/AsyncSSLSocket.h>
#include <folly/portability/GMock.h>
namespace folly { namespace test { namespace folly { namespace test {
......
...@@ -15,10 +15,9 @@ ...@@ -15,10 +15,9 @@
*/ */
#pragma once #pragma once
#include <gmock/gmock.h>
#include <folly/io/async/AsyncServerSocket.h> #include <folly/io/async/AsyncServerSocket.h>
#include <folly/io/async/EventBase.h> #include <folly/io/async/EventBase.h>
#include <folly/portability/GMock.h>
namespace folly { namespace folly {
......
...@@ -15,10 +15,9 @@ ...@@ -15,10 +15,9 @@
*/ */
#pragma once #pragma once
#include <gmock/gmock.h>
#include <folly/io/async/AsyncSocket.h> #include <folly/io/async/AsyncSocket.h>
#include <folly/io/async/EventBase.h> #include <folly/io/async/EventBase.h>
#include <folly/portability/GMock.h>
namespace folly { namespace folly {
......
...@@ -15,10 +15,9 @@ ...@@ -15,10 +15,9 @@
*/ */
#pragma once #pragma once
#include <gmock/gmock.h>
#include <folly/Memory.h> #include <folly/Memory.h>
#include <folly/io/async/AsyncTransport.h> #include <folly/io/async/AsyncTransport.h>
#include <folly/portability/GMock.h>
namespace folly { namespace test { namespace folly { namespace test {
......
...@@ -15,9 +15,8 @@ ...@@ -15,9 +15,8 @@
*/ */
#pragma once #pragma once
#include <gmock/gmock.h>
#include <folly/io/async/AsyncUDPSocket.h> #include <folly/io/async/AsyncUDPSocket.h>
#include <folly/portability/GMock.h>
namespace folly { namespace test { namespace folly { namespace test {
......
...@@ -16,8 +16,9 @@ ...@@ -16,8 +16,9 @@
#pragma once #pragma once
#include <folly/io/async/TimeoutManager.h> #include <folly/io/async/TimeoutManager.h>
#include <folly/portability/GMock.h>
#include <chrono> #include <chrono>
#include <gmock/gmock.h>
namespace folly { namespace folly {
namespace test { namespace test {
......
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
* limitations under the License. * limitations under the License.
*/ */
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <gmock/gmock.h>
#include <folly/io/async/AsyncTransport.h> #include <folly/io/async/AsyncTransport.h>
#include <folly/io/async/WriteChainAsyncTransportWrapper.h> #include <folly/io/async/WriteChainAsyncTransportWrapper.h>
#include <folly/portability/GMock.h>
using namespace testing; using namespace testing;
using testing::_; using testing::_;
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <folly/detail/MemoryIdler.h> #include <folly/detail/MemoryIdler.h>
#include <folly/Baton.h> #include <folly/Baton.h>
#include <folly/portability/GMock.h>
#include <folly/portability/Windows.h> #include <folly/portability/Windows.h>
#include <memory> #include <memory>
...@@ -24,7 +25,6 @@ ...@@ -24,7 +25,6 @@
#include <assert.h> #include <assert.h>
#include <semaphore.h> #include <semaphore.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
using namespace folly; using namespace folly;
......
...@@ -20,10 +20,10 @@ ...@@ -20,10 +20,10 @@
#include <folly/Subprocess.h> #include <folly/Subprocess.h>
#include <folly/experimental/io/FsUtil.h> #include <folly/experimental/io/FsUtil.h>
#include <folly/io/async/EventBase.h> #include <folly/io/async/EventBase.h>
#include <folly/portability/GMock.h>
#include <folly/test/SingletonTestStructs.h> #include <folly/test/SingletonTestStructs.h>
#include <glog/logging.h> #include <glog/logging.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <boost/thread/barrier.hpp> #include <boost/thread/barrier.hpp>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment