diff options
author | Gennadiy Civil <misterg@google.com> | 2018-04-19 15:28:46 (GMT) |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2018-04-19 15:28:46 (GMT) |
commit | bb7a018348828024cff90bec67cc93a43ff20ee4 (patch) | |
tree | 30b9cc32e4145297b1ae3c70d332ca57671fc95c /googlemock | |
parent | 7b4ee66f5f8228a40ee6f39844a73ab6e7447db8 (diff) | |
download | googletest-bb7a018348828024cff90bec67cc93a43ff20ee4.zip googletest-bb7a018348828024cff90bec67cc93a43ff20ee4.tar.gz googletest-bb7a018348828024cff90bec67cc93a43ff20ee4.tar.bz2 |
reverting, testrefs/pull/1580/head
Diffstat (limited to 'googlemock')
-rw-r--r-- | googlemock/test/gmock-matchers_test.cc | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/googlemock/test/gmock-matchers_test.cc b/googlemock/test/gmock-matchers_test.cc index 37fcbfa..8b115cd 100644 --- a/googlemock/test/gmock-matchers_test.cc +++ b/googlemock/test/gmock-matchers_test.cc @@ -749,11 +749,6 @@ TEST(MatcherCastTest, NonImplicitlyConstructibleTypeWithOperatorEq) { EXPECT_FALSE(m3.Matches(239)); } -// ConvertibleFromAny does not work with MSVC. resulting in -// error C2440: 'initializing': cannot convert from 'Eq' to 'M' -// No constructor could take the source type, or constructor overload -// resolution was ambiguous - // The below ConvertibleFromAny struct is implicitly constructible from anything // and when in the same namespace can interact with other tests. In particular, // if it is in the same namespace as other tests and one removes @@ -764,9 +759,9 @@ TEST(MatcherCastTest, NonImplicitlyConstructibleTypeWithOperatorEq) { namespace convertible_from_any { // Implicitly convertible from any type. struct ConvertibleFromAny { -explicit ConvertibleFromAny(int a_value) : value(a_value) {} + ConvertibleFromAny(int a_value) : value(a_value) {} template <typename T> - ConvertibleFromAny(const T& /*a_value*/) : value(-1) { + explicit ConvertibleFromAny(const T& /*a_value*/) : value(-1) { ADD_FAILURE() << "Conversion constructor called"; } int value; @@ -794,7 +789,6 @@ TEST(MatcherCastTest, FromConvertibleFromAny) { } } // namespace convertible_from_any - struct IntReferenceWrapper { IntReferenceWrapper(const int& a_value) : value(&a_value) {} const int* value; @@ -899,8 +893,6 @@ TEST(SafeMatcherCastTest, FromSameType) { EXPECT_FALSE(m2.Matches(1)); } -#if !defined _MSC_VER - namespace convertible_from_any { TEST(SafeMatcherCastTest, ConversionConstructorIsUsed) { Matcher<ConvertibleFromAny> m = SafeMatcherCast<ConvertibleFromAny>(1); @@ -916,8 +908,6 @@ TEST(SafeMatcherCastTest, FromConvertibleFromAny) { } } // namespace convertible_from_any -#endif // !defined _MSC_VER - TEST(SafeMatcherCastTest, ValueIsNotCopied) { int n = 42; Matcher<IntReferenceWrapper> m = SafeMatcherCast<IntReferenceWrapper>(n); @@ -6733,7 +6723,7 @@ TEST(NotTest, WorksOnMoveOnlyType) { } // namespace gmock_matchers_test } // namespace testing -#if defined _MSC_VER +#if defined_MSC_VER # pragma warning(pop) #endif |