Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
bb7a0183
Commit
bb7a0183
authored
Apr 19, 2018
by
Gennadiy Civil
Browse files
reverting, test
parent
7b4ee66f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
13 deletions
+3
-13
googlemock/test/gmock-matchers_test.cc
googlemock/test/gmock-matchers_test.cc
+3
-13
No files found.
googlemock/test/gmock-matchers_test.cc
View file @
bb7a0183
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment