aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock/test/gmock-matchers_test.cc
diff options
context:
space:
mode:
authorGennadiy Civil <gennadiycivil@users.noreply.github.com>2017-10-25 10:33:54 -0400
committerGitHub <noreply@github.com>2017-10-25 10:33:54 -0400
commit7684db32712ea4fdb56e8d6f784c51d6f39e5e2c (patch)
treee8b98c51ad7fb8f9c55e6ca0f1c14f20a1567c45 /googlemock/test/gmock-matchers_test.cc
parent6d0bb75c81bc59770520e303f6a04737b8aedb39 (diff)
parent840c711e7bd7240b3f451821473c759ad3578412 (diff)
downloadgoogletest-7684db32712ea4fdb56e8d6f784c51d6f39e5e2c.tar.gz
googletest-7684db32712ea4fdb56e8d6f784c51d6f39e5e2c.tar.bz2
googletest-7684db32712ea4fdb56e8d6f784c51d6f39e5e2c.zip
Merge pull request #1218 from KindDragon/vs-build-fix
VS2015/2017 build fix and enable C++11 features (attempt number three)
Diffstat (limited to 'googlemock/test/gmock-matchers_test.cc')
-rw-r--r--googlemock/test/gmock-matchers_test.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/googlemock/test/gmock-matchers_test.cc b/googlemock/test/gmock-matchers_test.cc
index fc867487..4beaec4c 100644
--- a/googlemock/test/gmock-matchers_test.cc
+++ b/googlemock/test/gmock-matchers_test.cc
@@ -58,6 +58,11 @@
# include <forward_list> // NOLINT
#endif
+// Disable MSVC2015 warning for std::pair: "decorated name length exceeded, name was truncated".
+#if defined(_MSC_VER) && (_MSC_VER == 1900)
+# pragma warning(disable:4503)
+#endif
+
namespace testing {
namespace internal {
@@ -3931,8 +3936,11 @@ TEST(ResultOfTest, WorksForFunctionReferences) {
// Tests that ResultOf(f, ...) compiles and works as expected when f is a
// function object.
-struct Functor : public ::std::unary_function<int, std::string> {
- result_type operator()(argument_type input) const {
+struct Functor {
+ typedef std::string result_type;
+ typedef int argument_type;
+
+ std::string operator()(int input) const {
return IntToStringFunction(input);
}
};