summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--googlemock/include/gmock/gmock-matchers.h1
-rw-r--r--googlemock/test/gmock-generated-function-mockers_test.cc11
2 files changed, 1 insertions, 11 deletions
diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h
index 18a1c94..c1b29e6 100644
--- a/googlemock/include/gmock/gmock-matchers.h
+++ b/googlemock/include/gmock/gmock-matchers.h
@@ -47,6 +47,7 @@
#include <ostream> // NOLINT
#include <sstream>
#include <string>
+#include <type_traits>
#include <utility>
#include <vector>
#include "gmock/internal/gmock-internal-utils.h"
diff --git a/googlemock/test/gmock-generated-function-mockers_test.cc b/googlemock/test/gmock-generated-function-mockers_test.cc
index 41fbd26..79130bc 100644
--- a/googlemock/test/gmock-generated-function-mockers_test.cc
+++ b/googlemock/test/gmock-generated-function-mockers_test.cc
@@ -46,10 +46,6 @@
#include "gmock/gmock.h"
#include "gtest/gtest.h"
-#if !GTEST_OS_WINDOWS || defined(_MSC_VER)
-# define GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS
-#endif // !GTEST_OS_WINDOWS || defined(_MSC_VER)
-
namespace testing {
namespace gmock_generated_function_mockers_test {
@@ -82,9 +78,7 @@ class FooInterface {
virtual bool TakesNonConstReference(int& n) = 0; // NOLINT
virtual std::string TakesConstReference(const int& n) = 0;
-#ifdef GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS
virtual bool TakesConst(const int x) = 0;
-#endif // GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS
virtual int OverloadedOnArgumentNumber() = 0;
virtual int OverloadedOnArgumentNumber(int n) = 0;
@@ -133,10 +127,7 @@ class MockFoo : public FooInterface {
MOCK_METHOD1(TakesNonConstReference, bool(int&)); // NOLINT
MOCK_METHOD1(TakesConstReference, std::string(const int&));
-
-#ifdef GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS
MOCK_METHOD1(TakesConst, bool(const int)); // NOLINT
-#endif
// Tests that the function return type can contain unprotected comma.
MOCK_METHOD0(ReturnTypeWithComma, std::map<int, std::string>());
@@ -246,7 +237,6 @@ TEST_F(FunctionMockerTest, MocksFunctionWithConstReferenceArgument) {
EXPECT_EQ("Hello", foo_->TakesConstReference(a));
}
-#ifdef GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS
// Tests mocking a function that takes a const variable.
TEST_F(FunctionMockerTest, MocksFunctionWithConstArgument) {
EXPECT_CALL(mock_foo_, TakesConst(Lt(10)))
@@ -254,7 +244,6 @@ TEST_F(FunctionMockerTest, MocksFunctionWithConstArgument) {
EXPECT_FALSE(foo_->TakesConst(5));
}
-#endif // GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS
// Tests mocking functions overloaded on the number of arguments.
TEST_F(FunctionMockerTest, MocksFunctionsOverloadedOnArgumentNumber) {