summaryrefslogtreecommitdiffstats
path: root/googlemock
diff options
context:
space:
mode:
authorRobin Lindén <dev@robinlinden.eu>2018-11-10 15:05:55 +0100
committerRobin Lindén <dev@robinlinden.eu>2018-11-10 15:20:26 +0100
commit826656b25f62ed0a2fadc7c5dde303616e621c08 (patch)
tree01db8e689dc6d256d0a5d65dad6d714cc39b8273 /googlemock
parentde5be0eb28b74ecd6335e3bd61d9dc8914ce0e57 (diff)
downloadgoogletest-826656b25f62ed0a2fadc7c5dde303616e621c08.tar.gz
googletest-826656b25f62ed0a2fadc7c5dde303616e621c08.zip
Remove workarounds for unsupported MSVC versions
Diffstat (limited to 'googlemock')
-rw-r--r--googlemock/include/gmock/gmock-matchers.h7
-rw-r--r--googlemock/include/gmock/internal/gmock-port.h6
-rw-r--r--googlemock/src/gmock-spec-builders.cc6
-rw-r--r--googlemock/test/gmock-actions_test.cc4
-rw-r--r--googlemock/test/gmock-generated-function-mockers_test.cc7
5 files changed, 10 insertions, 20 deletions
diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h
index 95bc22c5..18a1c947 100644
--- a/googlemock/include/gmock/gmock-matchers.h
+++ b/googlemock/include/gmock/gmock-matchers.h
@@ -2484,15 +2484,8 @@ class PropertyMatcher {
*listener << whose_property_ << "is ";
// Cannot pass the return value (for example, int) to MatchPrintAndExplain,
// which takes a non-const reference as argument.
-#if defined(_PREFAST_ ) && _MSC_VER == 1800
- // Workaround bug in VC++ 2013's /analyze parser.
- // https://connect.microsoft.com/VisualStudio/feedback/details/1106363/internal-compiler-error-with-analyze-due-to-failure-to-infer-move
- posix::Abort(); // To make sure it is never run.
- return false;
-#else
RefToConstProperty result = (obj.*property_)();
return MatchPrintAndExplain(result, matcher_, listener);
-#endif
}
bool MatchAndExplainImpl(true_type /* is_pointer */, const Class* p,
diff --git a/googlemock/include/gmock/internal/gmock-port.h b/googlemock/include/gmock/internal/gmock-port.h
index c5932493..063e2929 100644
--- a/googlemock/include/gmock/internal/gmock-port.h
+++ b/googlemock/include/gmock/internal/gmock-port.h
@@ -55,10 +55,10 @@
#include "gtest/internal/gtest-port.h"
#include "gmock/internal/custom/gmock-port.h"
-// For MS Visual C++, check the compiler version. At least VS 2003 is
+// For MS Visual C++, check the compiler version. At least VS 2015 is
// required to compile Google Mock.
-#if defined(_MSC_VER) && _MSC_VER < 1310
-# error "At least Visual C++ 2003 (7.1) is required to compile Google Mock."
+#if defined(_MSC_VER) && _MSC_VER < 1900
+# error "At least Visual C++ 2015 (14.0) is required to compile Google Mock."
#endif
// Macro for referencing flags. This is public as we want the user to
diff --git a/googlemock/src/gmock-spec-builders.cc b/googlemock/src/gmock-spec-builders.cc
index e8b51f6c..5db774ed 100644
--- a/googlemock/src/gmock-spec-builders.cc
+++ b/googlemock/src/gmock-spec-builders.cc
@@ -50,9 +50,9 @@
#endif
// Silence C4800 (C4800: 'int *const ': forcing value
-// to bool 'true' or 'false') for MSVC 14,15
+// to bool 'true' or 'false') for MSVC 15
#ifdef _MSC_VER
-#if _MSC_VER <= 1900
+#if _MSC_VER == 1900
# pragma warning(push)
# pragma warning(disable:4800)
#endif
@@ -887,7 +887,7 @@ InSequence::~InSequence() {
} // namespace testing
#ifdef _MSC_VER
-#if _MSC_VER <= 1900
+#if _MSC_VER == 1900
# pragma warning(pop)
#endif
#endif
diff --git a/googlemock/test/gmock-actions_test.cc b/googlemock/test/gmock-actions_test.cc
index 0de84811..5b9f3dd6 100644
--- a/googlemock/test/gmock-actions_test.cc
+++ b/googlemock/test/gmock-actions_test.cc
@@ -33,9 +33,9 @@
// This file tests the built-in actions.
// Silence C4800 (C4800: 'int *const ': forcing value
-// to bool 'true' or 'false') for MSVC 14,15
+// to bool 'true' or 'false') for MSVC 15
#ifdef _MSC_VER
-#if _MSC_VER <= 1900
+#if _MSC_VER == 1900
# pragma warning(push)
# pragma warning(disable:4800)
#endif
diff --git a/googlemock/test/gmock-generated-function-mockers_test.cc b/googlemock/test/gmock-generated-function-mockers_test.cc
index 02c4203c..41fbd268 100644
--- a/googlemock/test/gmock-generated-function-mockers_test.cc
+++ b/googlemock/test/gmock-generated-function-mockers_test.cc
@@ -46,12 +46,9 @@
#include "gmock/gmock.h"
#include "gtest/gtest.h"
-// There is a bug in MSVC (fixed in VS 2008) that prevents creating a
-// mock for a function with const arguments, so we don't test such
-// cases for MSVC versions older than 2008.
-#if !GTEST_OS_WINDOWS || (_MSC_VER >= 1500)
+#if !GTEST_OS_WINDOWS || defined(_MSC_VER)
# define GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS
-#endif // !GTEST_OS_WINDOWS || (_MSC_VER >= 1500)
+#endif // !GTEST_OS_WINDOWS || defined(_MSC_VER)
namespace testing {
namespace gmock_generated_function_mockers_test {
OpenPOWER on IntegriCloud