aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock/include/gmock/internal
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2018-12-28 06:03:51 -0500
committerGennadiy Civil <misterg@google.com>2019-01-02 16:51:33 -0500
commitf8b1c1af17750189b83c58f360c85268c0d95105 (patch)
tree5785da224e6e5f05ecd044721e87138b681932a1 /googlemock/include/gmock/internal
parent933e5df283727911161f8fb56cc4773b08c12d3d (diff)
downloadgoogletest-f8b1c1af17750189b83c58f360c85268c0d95105.tar.gz
googletest-f8b1c1af17750189b83c58f360c85268c0d95105.tar.bz2
googletest-f8b1c1af17750189b83c58f360c85268c0d95105.zip
Googletest export
Remove the #ifs for old, unsupported and buggy compilers: * old versions of GCC & MSVC * Symbian PiperOrigin-RevId: 227116941
Diffstat (limited to 'googlemock/include/gmock/internal')
-rw-r--r--googlemock/include/gmock/internal/gmock-generated-internal-utils.h14
-rw-r--r--googlemock/include/gmock/internal/gmock-generated-internal-utils.h.pump14
-rw-r--r--googlemock/include/gmock/internal/gmock-internal-utils.h29
3 files changed, 3 insertions, 54 deletions
diff --git a/googlemock/include/gmock/internal/gmock-generated-internal-utils.h b/googlemock/include/gmock/internal/gmock-generated-internal-utils.h
index efa04629..eb85e266 100644
--- a/googlemock/include/gmock/internal/gmock-generated-internal-utils.h
+++ b/googlemock/include/gmock/internal/gmock-generated-internal-utils.h
@@ -43,6 +43,7 @@
#define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_
#include "gmock/internal/gmock-port.h"
+#include "gtest/gtest.h"
namespace testing {
@@ -51,19 +52,6 @@ class Matcher;
namespace internal {
-// An IgnoredValue object can be implicitly constructed from ANY value.
-// This is used in implementing the IgnoreResult(a) action.
-class IgnoredValue {
- public:
- // This constructor template allows any value to be implicitly
- // converted to IgnoredValue. The object has no data member and
- // doesn't try to remember anything about the argument. We
- // deliberately omit the 'explicit' keyword in order to allow the
- // conversion to be implicit.
- template <typename T>
- IgnoredValue(const T& /* ignored */) {} // NOLINT(runtime/explicit)
-};
-
// MatcherTuple<T>::type is a tuple type where each field is a Matcher
// for the corresponding field in tuple type T.
template <typename Tuple>
diff --git a/googlemock/include/gmock/internal/gmock-generated-internal-utils.h.pump b/googlemock/include/gmock/internal/gmock-generated-internal-utils.h.pump
index 9962f6b3..6787905b 100644
--- a/googlemock/include/gmock/internal/gmock-generated-internal-utils.h.pump
+++ b/googlemock/include/gmock/internal/gmock-generated-internal-utils.h.pump
@@ -44,6 +44,7 @@ $var n = 10 $$ The maximum arity we support.
#define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_
#include "gmock/internal/gmock-port.h"
+#include "gtest/gtest.h"
namespace testing {
@@ -52,19 +53,6 @@ class Matcher;
namespace internal {
-// An IgnoredValue object can be implicitly constructed from ANY value.
-// This is used in implementing the IgnoreResult(a) action.
-class IgnoredValue {
- public:
- // This constructor template allows any value to be implicitly
- // converted to IgnoredValue. The object has no data member and
- // doesn't try to remember anything about the argument. We
- // deliberately omit the 'explicit' keyword in order to allow the
- // conversion to be implicit.
- template <typename T>
- IgnoredValue(const T& /* ignored */) {} // NOLINT(runtime/explicit)
-};
-
// MatcherTuple<T>::type is a tuple type where each field is a Matcher
// for the corresponding field in tuple type T.
template <typename Tuple>
diff --git a/googlemock/include/gmock/internal/gmock-internal-utils.h b/googlemock/include/gmock/internal/gmock-internal-utils.h
index 133fccef..3de3d545 100644
--- a/googlemock/include/gmock/internal/gmock-internal-utils.h
+++ b/googlemock/include/gmock/internal/gmock-internal-utils.h
@@ -92,16 +92,11 @@ inline const typename Pointer::element_type* GetRawPointer(const Pointer& p) {
template <typename Element>
inline Element* GetRawPointer(Element* p) { return p; }
-// Symbian compilation can be done with wchar_t being either a native
-// type or a typedef. Using Google Mock with OpenC without wchar_t
-// should require the definition of _STLP_NO_WCHAR_T.
-//
// MSVC treats wchar_t as a native type usually, but treats it as the
// same as unsigned short when the compiler option /Zc:wchar_t- is
// specified. It defines _NATIVE_WCHAR_T_DEFINED symbol when wchar_t
// is a native type.
-#if (GTEST_OS_SYMBIAN && defined(_STLP_NO_WCHAR_T)) || \
- (defined(_MSC_VER) && !defined(_NATIVE_WCHAR_T_DEFINED))
+#if defined(_MSC_VER) && !defined(_NATIVE_WCHAR_T_DEFINED)
// wchar_t is a typedef.
#else
# define GMOCK_WCHAR_T_IS_NATIVE_ 1
@@ -452,32 +447,10 @@ class StlContainerView<Element[N]> {
static const_reference ConstReference(const Element (&array)[N]) {
// Ensures that Element is not a const type.
testing::StaticAssertTypeEq<Element, RawElement>();
-#if GTEST_OS_SYMBIAN
- // The Nokia Symbian compiler confuses itself in template instantiation
- // for this call without the cast to Element*:
- // function call '[testing::internal::NativeArray<char *>].NativeArray(
- // {lval} const char *[4], long, testing::internal::RelationToSource)'
- // does not match
- // 'testing::internal::NativeArray<char *>::NativeArray(
- // char *const *, unsigned int, testing::internal::RelationToSource)'
- // (instantiating: 'testing::internal::ContainsMatcherImpl
- // <const char * (&)[4]>::Matches(const char * (&)[4]) const')
- // (instantiating: 'testing::internal::StlContainerView<char *[4]>::
- // ConstReference(const char * (&)[4])')
- // (and though the N parameter type is mismatched in the above explicit
- // conversion of it doesn't help - only the conversion of the array).
- return type(const_cast<Element*>(&array[0]), N,
- RelationToSourceReference());
-#else
return type(array, N, RelationToSourceReference());
-#endif // GTEST_OS_SYMBIAN
}
static type Copy(const Element (&array)[N]) {
-#if GTEST_OS_SYMBIAN
- return type(const_cast<Element*>(&array[0]), N, RelationToSourceCopy());
-#else
return type(array, N, RelationToSourceCopy());
-#endif // GTEST_OS_SYMBIAN
}
};