summaryrefslogtreecommitdiff
path: root/chromium/third_party/googletest/src/googlemock
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-05-24 11:40:17 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-05-24 12:42:11 +0000
commit5d87695f37678f96492b258bbab36486c59866b4 (patch)
treebe9783bbaf04fb930c4d74ca9c00b5e7954c8bc6 /chromium/third_party/googletest/src/googlemock
parent6c11fb357ec39bf087b8b632e2b1e375aef1b38b (diff)
downloadqtwebengine-chromium-5d87695f37678f96492b258bbab36486c59866b4.tar.gz
BASELINE: Update Chromium to 75.0.3770.56
Change-Id: I86d2007fd27a45d5797eee06f4c9369b8b50ac4f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/third_party/googletest/src/googlemock')
-rw-r--r--chromium/third_party/googletest/src/googlemock/CMakeLists.txt2
-rw-r--r--chromium/third_party/googletest/src/googlemock/Makefile.am2
-rw-r--r--chromium/third_party/googletest/src/googlemock/configure.ac1
-rw-r--r--chromium/third_party/googletest/src/googlemock/docs/ForDummies.md2
-rw-r--r--chromium/third_party/googletest/src/googlemock/include/gmock/gmock-actions.h11
-rw-r--r--chromium/third_party/googletest/src/googlemock/include/gmock/gmock-function-mocker.h2
-rw-r--r--chromium/third_party/googletest/src/googlemock/include/gmock/gmock-generated-actions.h140
-rw-r--r--chromium/third_party/googletest/src/googlemock/include/gmock/gmock-generated-actions.h.pump6
-rw-r--r--chromium/third_party/googletest/src/googlemock/include/gmock/gmock-matchers.h23
9 files changed, 109 insertions, 80 deletions
diff --git a/chromium/third_party/googletest/src/googlemock/CMakeLists.txt b/chromium/third_party/googletest/src/googlemock/CMakeLists.txt
index b0c1db8322b..eff2a6be33d 100644
--- a/chromium/third_party/googletest/src/googlemock/CMakeLists.txt
+++ b/chromium/third_party/googletest/src/googlemock/CMakeLists.txt
@@ -49,7 +49,7 @@ endif()
# targets to the current scope. We are placing Google Test's binary
# directory in a subdirectory of our own as VC compilation may break
# if they are the same (the default).
-add_subdirectory("${gtest_dir}" "${gmock_BINARY_DIR}/gtest")
+add_subdirectory("${gtest_dir}" "${gmock_BINARY_DIR}/${gtest_dir}")
# These commands only run if this is the main project
diff --git a/chromium/third_party/googletest/src/googlemock/Makefile.am b/chromium/third_party/googletest/src/googlemock/Makefile.am
index 8e0128fa5fc..c77ef2b8c59 100644
--- a/chromium/third_party/googletest/src/googlemock/Makefile.am
+++ b/chromium/third_party/googletest/src/googlemock/Makefile.am
@@ -1,5 +1,7 @@
# Automake file
+ACLOCAL_AMFLAGS = -I m4
+
# Nonstandard package files for distribution.
EXTRA_DIST = LICENSE
diff --git a/chromium/third_party/googletest/src/googlemock/configure.ac b/chromium/third_party/googletest/src/googlemock/configure.ac
index 9456c3d5370..aaa4ad431a5 100644
--- a/chromium/third_party/googletest/src/googlemock/configure.ac
+++ b/chromium/third_party/googletest/src/googlemock/configure.ac
@@ -8,6 +8,7 @@ AC_INIT([Google C++ Mocking Framework],
# Provide various options to initialize the Autoconf and configure processes.
AC_PREREQ([2.59])
AC_CONFIG_SRCDIR([./LICENSE])
+AC_CONFIG_MACRO_DIRS([m4])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([build-aux/config.h])
AC_CONFIG_FILES([Makefile])
diff --git a/chromium/third_party/googletest/src/googlemock/docs/ForDummies.md b/chromium/third_party/googletest/src/googlemock/docs/ForDummies.md
index e2a430f8b66..f4eba809f35 100644
--- a/chromium/third_party/googletest/src/googlemock/docs/ForDummies.md
+++ b/chromium/third_party/googletest/src/googlemock/docs/ForDummies.md
@@ -17,7 +17,7 @@ If all this seems too abstract for you, don't worry - the most important thing t
Using Google Mock involves three basic steps:
1. Use some simple macros to describe the interface you want to mock, and they will expand to the implementation of your mock class;
- 1. Create some mock objects and specify its expectations and behavior using an intuitive syntax;
+ 1. Create some mock objects and specify their expectations and behavior using an intuitive syntax;
1. Exercise code that uses the mock objects. Google Mock will catch any violation of the expectations as soon as it arises.
# Why Google Mock? #
diff --git a/chromium/third_party/googletest/src/googlemock/include/gmock/gmock-actions.h b/chromium/third_party/googletest/src/googlemock/include/gmock/gmock-actions.h
index 2f936a15b33..37727c09713 100644
--- a/chromium/third_party/googletest/src/googlemock/include/gmock/gmock-actions.h
+++ b/chromium/third_party/googletest/src/googlemock/include/gmock/gmock-actions.h
@@ -139,9 +139,6 @@ class BuiltInDefaultValue<T*> {
}
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(void, ); // NOLINT
-#if GTEST_HAS_GLOBAL_STRING
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(::string, "");
-#endif // GTEST_HAS_GLOBAL_STRING
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(::std::string, "");
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(bool, false);
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned char, '\0');
@@ -773,8 +770,8 @@ class SetErrnoAndReturnAction {
// Implements the SetArgumentPointee<N>(x) action for any function
// whose N-th argument (0-based) is a pointer to x's type. The
-// template parameter kIsProto is true iff type A is ProtocolMessage,
-// proto2::Message, or a sub-class of those.
+// template parameter kIsProto is true iff type A is
+// proto2::Message or a sub-class of it.
template <size_t N, typename A, bool kIsProto>
class SetArgumentPointeeAction {
public:
@@ -798,9 +795,7 @@ template <size_t N, typename Proto>
class SetArgumentPointeeAction<N, Proto, true> {
public:
// Constructs an action that sets the variable pointed to by the
- // N-th function argument to 'proto'. Both ProtocolMessage and
- // proto2::Message have the CopyFrom() method, so the same
- // implementation works for both.
+ // N-th function argument to 'proto'.
explicit SetArgumentPointeeAction(const Proto& proto) : proto_(new Proto) {
proto_->CopyFrom(proto);
}
diff --git a/chromium/third_party/googletest/src/googlemock/include/gmock/gmock-function-mocker.h b/chromium/third_party/googletest/src/googlemock/include/gmock/gmock-function-mocker.h
index 3d142049f98..84a608e1890 100644
--- a/chromium/third_party/googletest/src/googlemock/include/gmock/gmock-function-mocker.h
+++ b/chromium/third_party/googletest/src/googlemock/include/gmock/gmock-function-mocker.h
@@ -21,7 +21,7 @@
GMOCK_INTERNAL_ASSERT_PARENTHESIS(_Spec); \
GMOCK_INTERNAL_ASSERT_VALID_SIGNATURE( \
GMOCK_PP_NARG0 _Args, GMOCK_INTERNAL_SIGNATURE(_Ret, _Args)); \
- GMOCK_INTERNAL_ASSERT_VALID_SPEC(_Spec); \
+ GMOCK_INTERNAL_ASSERT_VALID_SPEC(_Spec) \
GMOCK_INTERNAL_MOCK_METHOD_IMPL( \
GMOCK_PP_NARG0 _Args, _MethodName, GMOCK_INTERNAL_HAS_CONST(_Spec), \
GMOCK_INTERNAL_HAS_OVERRIDE(_Spec), GMOCK_INTERNAL_HAS_FINAL(_Spec), \
diff --git a/chromium/third_party/googletest/src/googlemock/include/gmock/gmock-generated-actions.h b/chromium/third_party/googletest/src/googlemock/include/gmock/gmock-generated-actions.h
index 3264bca6a41..409886cfe57 100644
--- a/chromium/third_party/googletest/src/googlemock/include/gmock/gmock-generated-actions.h
+++ b/chromium/third_party/googletest/src/googlemock/include/gmock/gmock-generated-actions.h
@@ -273,16 +273,16 @@ class ActionHelper {
// An internal macro needed for implementing ACTION*().
#define GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_\
const args_type& args GTEST_ATTRIBUTE_UNUSED_, \
- arg0_type arg0 GTEST_ATTRIBUTE_UNUSED_, \
- arg1_type arg1 GTEST_ATTRIBUTE_UNUSED_, \
- arg2_type arg2 GTEST_ATTRIBUTE_UNUSED_, \
- arg3_type arg3 GTEST_ATTRIBUTE_UNUSED_, \
- arg4_type arg4 GTEST_ATTRIBUTE_UNUSED_, \
- arg5_type arg5 GTEST_ATTRIBUTE_UNUSED_, \
- arg6_type arg6 GTEST_ATTRIBUTE_UNUSED_, \
- arg7_type arg7 GTEST_ATTRIBUTE_UNUSED_, \
- arg8_type arg8 GTEST_ATTRIBUTE_UNUSED_, \
- arg9_type arg9 GTEST_ATTRIBUTE_UNUSED_
+ const arg0_type& arg0 GTEST_ATTRIBUTE_UNUSED_, \
+ const arg1_type& arg1 GTEST_ATTRIBUTE_UNUSED_, \
+ const arg2_type& arg2 GTEST_ATTRIBUTE_UNUSED_, \
+ const arg3_type& arg3 GTEST_ATTRIBUTE_UNUSED_, \
+ const arg4_type& arg4 GTEST_ATTRIBUTE_UNUSED_, \
+ const arg5_type& arg5 GTEST_ATTRIBUTE_UNUSED_, \
+ const arg6_type& arg6 GTEST_ATTRIBUTE_UNUSED_, \
+ const arg7_type& arg7 GTEST_ATTRIBUTE_UNUSED_, \
+ const arg8_type& arg8 GTEST_ATTRIBUTE_UNUSED_, \
+ const arg9_type& arg9 GTEST_ATTRIBUTE_UNUSED_
// Sometimes you want to give an action explicit template parameters
// that cannot be inferred from its value parameters. ACTION() and
@@ -672,10 +672,12 @@ class ActionHelper {
typename arg3_type, typename arg4_type, typename arg5_type, \
typename arg6_type, typename arg7_type, typename arg8_type, \
typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
+ return_type gmock_PerformImpl(const args_type& args, \
+ const arg0_type& arg0, const arg1_type& arg1, \
+ const arg2_type& arg2, const arg3_type& arg3, \
+ const arg4_type& arg4, const arg5_type& arg5, \
+ const arg6_type& arg6, const arg7_type& arg7, \
+ const arg8_type& arg8, const arg9_type& arg9) const;\
GMOCK_INTERNAL_DEFN_##value_params\
private:\
GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
@@ -733,10 +735,12 @@ class ActionHelper {
typename arg3_type, typename arg4_type, typename arg5_type, \
typename arg6_type, typename arg7_type, typename arg8_type, \
typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
+ return_type gmock_PerformImpl(const args_type& args, \
+ const arg0_type& arg0, const arg1_type& arg1, \
+ const arg2_type& arg2, const arg3_type& arg3, \
+ const arg4_type& arg4, const arg5_type& arg5, \
+ const arg6_type& arg6, const arg7_type& arg7, \
+ const arg8_type& arg8, const arg9_type& arg9) const;\
private:\
GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
};\
@@ -781,10 +785,12 @@ class ActionHelper {
typename arg3_type, typename arg4_type, typename arg5_type, \
typename arg6_type, typename arg7_type, typename arg8_type, \
typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
+ return_type gmock_PerformImpl(const args_type& args, \
+ const arg0_type& arg0, const arg1_type& arg1, \
+ const arg2_type& arg2, const arg3_type& arg3, \
+ const arg4_type& arg4, const arg5_type& arg5, \
+ const arg6_type& arg6, const arg7_type& arg7, \
+ const arg8_type& arg8, const arg9_type& arg9) const;\
p0##_type p0;\
private:\
GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
@@ -835,10 +841,12 @@ class ActionHelper {
typename arg3_type, typename arg4_type, typename arg5_type, \
typename arg6_type, typename arg7_type, typename arg8_type, \
typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
+ return_type gmock_PerformImpl(const args_type& args, \
+ const arg0_type& arg0, const arg1_type& arg1, \
+ const arg2_type& arg2, const arg3_type& arg3, \
+ const arg4_type& arg4, const arg5_type& arg5, \
+ const arg6_type& arg6, const arg7_type& arg7, \
+ const arg8_type& arg8, const arg9_type& arg9) const;\
p0##_type p0;\
p1##_type p1;\
private:\
@@ -894,10 +902,12 @@ class ActionHelper {
typename arg3_type, typename arg4_type, typename arg5_type, \
typename arg6_type, typename arg7_type, typename arg8_type, \
typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
+ return_type gmock_PerformImpl(const args_type& args, \
+ const arg0_type& arg0, const arg1_type& arg1, \
+ const arg2_type& arg2, const arg3_type& arg3, \
+ const arg4_type& arg4, const arg5_type& arg5, \
+ const arg6_type& arg6, const arg7_type& arg7, \
+ const arg8_type& arg8, const arg9_type& arg9) const;\
p0##_type p0;\
p1##_type p1;\
p2##_type p2;\
@@ -960,10 +970,12 @@ class ActionHelper {
typename arg3_type, typename arg4_type, typename arg5_type, \
typename arg6_type, typename arg7_type, typename arg8_type, \
typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
+ return_type gmock_PerformImpl(const args_type& args, \
+ const arg0_type& arg0, const arg1_type& arg1, \
+ const arg2_type& arg2, const arg3_type& arg3, \
+ const arg4_type& arg4, const arg5_type& arg5, \
+ const arg6_type& arg6, const arg7_type& arg7, \
+ const arg8_type& arg8, const arg9_type& arg9) const;\
p0##_type p0;\
p1##_type p1;\
p2##_type p2;\
@@ -1035,10 +1047,12 @@ class ActionHelper {
typename arg3_type, typename arg4_type, typename arg5_type, \
typename arg6_type, typename arg7_type, typename arg8_type, \
typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
+ return_type gmock_PerformImpl(const args_type& args, \
+ const arg0_type& arg0, const arg1_type& arg1, \
+ const arg2_type& arg2, const arg3_type& arg3, \
+ const arg4_type& arg4, const arg5_type& arg5, \
+ const arg6_type& arg6, const arg7_type& arg7, \
+ const arg8_type& arg8, const arg9_type& arg9) const;\
p0##_type p0;\
p1##_type p1;\
p2##_type p2;\
@@ -1114,10 +1128,12 @@ class ActionHelper {
typename arg3_type, typename arg4_type, typename arg5_type, \
typename arg6_type, typename arg7_type, typename arg8_type, \
typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
+ return_type gmock_PerformImpl(const args_type& args, \
+ const arg0_type& arg0, const arg1_type& arg1, \
+ const arg2_type& arg2, const arg3_type& arg3, \
+ const arg4_type& arg4, const arg5_type& arg5, \
+ const arg6_type& arg6, const arg7_type& arg7, \
+ const arg8_type& arg8, const arg9_type& arg9) const;\
p0##_type p0;\
p1##_type p1;\
p2##_type p2;\
@@ -1199,10 +1215,12 @@ class ActionHelper {
typename arg3_type, typename arg4_type, typename arg5_type, \
typename arg6_type, typename arg7_type, typename arg8_type, \
typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
+ return_type gmock_PerformImpl(const args_type& args, \
+ const arg0_type& arg0, const arg1_type& arg1, \
+ const arg2_type& arg2, const arg3_type& arg3, \
+ const arg4_type& arg4, const arg5_type& arg5, \
+ const arg6_type& arg6, const arg7_type& arg7, \
+ const arg8_type& arg8, const arg9_type& arg9) const;\
p0##_type p0;\
p1##_type p1;\
p2##_type p2;\
@@ -1293,10 +1311,12 @@ class ActionHelper {
typename arg3_type, typename arg4_type, typename arg5_type, \
typename arg6_type, typename arg7_type, typename arg8_type, \
typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
+ return_type gmock_PerformImpl(const args_type& args, \
+ const arg0_type& arg0, const arg1_type& arg1, \
+ const arg2_type& arg2, const arg3_type& arg3, \
+ const arg4_type& arg4, const arg5_type& arg5, \
+ const arg6_type& arg6, const arg7_type& arg7, \
+ const arg8_type& arg8, const arg9_type& arg9) const;\
p0##_type p0;\
p1##_type p1;\
p2##_type p2;\
@@ -1393,10 +1413,12 @@ class ActionHelper {
typename arg3_type, typename arg4_type, typename arg5_type, \
typename arg6_type, typename arg7_type, typename arg8_type, \
typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
+ return_type gmock_PerformImpl(const args_type& args, \
+ const arg0_type& arg0, const arg1_type& arg1, \
+ const arg2_type& arg2, const arg3_type& arg3, \
+ const arg4_type& arg4, const arg5_type& arg5, \
+ const arg6_type& arg6, const arg7_type& arg7, \
+ const arg8_type& arg8, const arg9_type& arg9) const;\
p0##_type p0;\
p1##_type p1;\
p2##_type p2;\
@@ -1500,10 +1522,12 @@ class ActionHelper {
typename arg3_type, typename arg4_type, typename arg5_type, \
typename arg6_type, typename arg7_type, typename arg8_type, \
typename arg9_type>\
- return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \
- arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \
- arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \
- arg9_type arg9) const;\
+ return_type gmock_PerformImpl(const args_type& args, \
+ const arg0_type& arg0, const arg1_type& arg1, \
+ const arg2_type& arg2, const arg3_type& arg3, \
+ const arg4_type& arg4, const arg5_type& arg5, \
+ const arg6_type& arg6, const arg7_type& arg7, \
+ const arg8_type& arg8, const arg9_type& arg9) const;\
p0##_type p0;\
p1##_type p1;\
p2##_type p2;\
diff --git a/chromium/third_party/googletest/src/googlemock/include/gmock/gmock-generated-actions.h.pump b/chromium/third_party/googletest/src/googlemock/include/gmock/gmock-generated-actions.h.pump
index 1e9549f332f..87c580c44a8 100644
--- a/chromium/third_party/googletest/src/googlemock/include/gmock/gmock-generated-actions.h.pump
+++ b/chromium/third_party/googletest/src/googlemock/include/gmock/gmock-generated-actions.h.pump
@@ -200,7 +200,7 @@ $range k 0..n-1
#define GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_\
const args_type& args GTEST_ATTRIBUTE_UNUSED_
$for k [[, \
- arg$k[[]]_type arg$k GTEST_ATTRIBUTE_UNUSED_]]
+ const arg$k[[]]_type& arg$k GTEST_ATTRIBUTE_UNUSED_]]
// Sometimes you want to give an action explicit template parameters
@@ -402,7 +402,7 @@ $range k 0..n-1
}\
template <$for k, [[typename arg$k[[]]_type]]>\
return_type gmock_PerformImpl(const args_type& args[[]]
-$for k [[, arg$k[[]]_type arg$k]]) const;\
+$for k [[, const arg$k[[]]_type& arg$k]]) const;\
GMOCK_INTERNAL_DEFN_##value_params\
private:\
GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
@@ -467,7 +467,7 @@ $var param_field_decls2 = [[$for j
$var params = [[$for j, [[p$j]]]]
$var param_types = [[$if i==0 [[]] $else [[<$for j, [[p$j##_type]]>]]]]
$var typename_arg_types = [[$for k, [[typename arg$k[[]]_type]]]]
-$var arg_types_and_names = [[$for k, [[arg$k[[]]_type arg$k]]]]
+$var arg_types_and_names = [[$for k, [[const arg$k[[]]_type& arg$k]]]]
$var macro_name = [[$if i==0 [[ACTION]] $elif i==1 [[ACTION_P]]
$else [[ACTION_P$i]]]]
diff --git a/chromium/third_party/googletest/src/googlemock/include/gmock/gmock-matchers.h b/chromium/third_party/googletest/src/googlemock/include/gmock/gmock-matchers.h
index fa24fd2f0b9..fcf8cf26e1b 100644
--- a/chromium/third_party/googletest/src/googlemock/include/gmock/gmock-matchers.h
+++ b/chromium/third_party/googletest/src/googlemock/include/gmock/gmock-matchers.h
@@ -58,9 +58,16 @@
#include "gmock/internal/gmock-port.h"
#include "gtest/gtest.h"
+// MSVC warning C5046 is new as of VS2017 version 15.8.
+#if defined(_MSC_VER) && _MSC_VER >= 1915
+#define GMOCK_MAYBE_5046_ 5046
+#else
+#define GMOCK_MAYBE_5046_
+#endif
+
GTEST_DISABLE_MSC_WARNINGS_PUSH_(
- 4251 5046 /* class A needs to have dll-interface to be used by clients of
- class B */
+ 4251 GMOCK_MAYBE_5046_ /* class A needs to have dll-interface to be used by
+ clients of class B */
/* Symbol involving type with internal linkage not defined */)
namespace testing {
@@ -661,7 +668,7 @@ class StrEqualityMatcher {
MatchResultListener* listener) const {
// This should fail to compile if absl::string_view is used with wide
// strings.
- const StringType& str = string(s);
+ const StringType& str = std::string(s);
return MatchAndExplain(str, listener);
}
#endif // GTEST_HAS_ABSL
@@ -731,7 +738,7 @@ class HasSubstrMatcher {
MatchResultListener* listener) const {
// This should fail to compile if absl::string_view is used with wide
// strings.
- const StringType& str = string(s);
+ const StringType& str = std::string(s);
return MatchAndExplain(str, listener);
}
#endif // GTEST_HAS_ABSL
@@ -788,7 +795,7 @@ class StartsWithMatcher {
MatchResultListener* listener) const {
// This should fail to compile if absl::string_view is used with wide
// strings.
- const StringType& str = string(s);
+ const StringType& str = std::string(s);
return MatchAndExplain(str, listener);
}
#endif // GTEST_HAS_ABSL
@@ -844,7 +851,7 @@ class EndsWithMatcher {
MatchResultListener* listener) const {
// This should fail to compile if absl::string_view is used with wide
// strings.
- const StringType& str = string(s);
+ const StringType& str = std::string(s);
return MatchAndExplain(str, listener);
}
#endif // GTEST_HAS_ABSL
@@ -3852,7 +3859,7 @@ inline PolymorphicMatcher<internal::EndsWithMatcher<std::string> > EndsWith(
return MakePolymorphicMatcher(internal::EndsWithMatcher<std::string>(suffix));
}
-#if GTEST_HAS_GLOBAL_WSTRING || GTEST_HAS_STD_WSTRING
+#if GTEST_HAS_STD_WSTRING
// Wide string matchers.
// Matches a string equal to str.
@@ -3905,7 +3912,7 @@ inline PolymorphicMatcher<internal::EndsWithMatcher<std::wstring> > EndsWith(
internal::EndsWithMatcher<std::wstring>(suffix));
}
-#endif // GTEST_HAS_GLOBAL_WSTRING || GTEST_HAS_STD_WSTRING
+#endif // GTEST_HAS_STD_WSTRING
// Creates a polymorphic matcher that matches a 2-tuple where the
// first field == the second field.