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
531e2948
Unverified
Commit
531e2948
authored
Apr 12, 2018
by
Gennadiy Civil
Committed by
GitHub
Apr 12, 2018
Browse files
Merge pull request #1562 from gennadiycivil/master
small cleanup
parents
b640d874
c67f51b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
googlemock/include/gmock/gmock-more-matchers.h
googlemock/include/gmock/gmock-more-matchers.h
+8
-0
googlemock/test/gmock-matchers_test.cc
googlemock/test/gmock-matchers_test.cc
+8
-2
No files found.
googlemock/include/gmock/gmock-more-matchers.h
View file @
531e2948
...
@@ -46,8 +46,11 @@ namespace testing {
...
@@ -46,8 +46,11 @@ namespace testing {
// Silence C4100 (unreferenced formal
// Silence C4100 (unreferenced formal
// parameter) for MSVC
// parameter) for MSVC
#ifdef _MSC_VER
#ifdef _MSC_VER
# pragma warning(push)
# pragma warning(disable:4100)
# pragma warning(disable:4100)
#if (_MSC_VER == 1900)
#if (_MSC_VER == 1900)
// and silence C4800 (C4800: 'int *const ': forcing value
// to bool 'true' or 'false') for MSVC 14
# pragma warning(disable:4800)
# pragma warning(disable:4800)
#endif
#endif
#endif
#endif
...
@@ -78,6 +81,11 @@ MATCHER(IsFalse, negation ? "is true" : "is false") {
...
@@ -78,6 +81,11 @@ MATCHER(IsFalse, negation ? "is true" : "is false") {
return
!
static_cast
<
bool
>
(
arg
);
return
!
static_cast
<
bool
>
(
arg
);
}
}
#ifdef _MSC_VER
# pragma warning(pop)
#endif
}
// namespace testing
}
// namespace testing
#endif // GMOCK_GMOCK_MORE_MATCHERS_H_
#endif // GMOCK_GMOCK_MORE_MATCHERS_H_
googlemock/test/gmock-matchers_test.cc
View file @
531e2948
...
@@ -61,7 +61,8 @@
...
@@ -61,7 +61,8 @@
// Disable MSVC2015 warning for std::pair:
// Disable MSVC2015 warning for std::pair:
// "decorated name length exceeded, name was truncated".
// "decorated name length exceeded, name was truncated".
#if defined(_MSC_VER) && (_MSC_VER == 1900)
#if defined _MSC_VER
# pragma warning(push)
# pragma warning(disable:4503)
# pragma warning(disable:4503)
#endif
#endif
...
@@ -6656,7 +6657,7 @@ TEST(AnyWithTest, TestUseInContainers) {
...
@@ -6656,7 +6657,7 @@ TEST(AnyWithTest, TestUseInContainers) {
AnyWith
<
std
::
string
>
(
"merhaba"
),
AnyWith
<
std
::
string
>
(
"merhaba"
),
AnyWith
<
std
::
string
>
(
"salut"
)}));
AnyWith
<
std
::
string
>
(
"salut"
)}));
}
}
#endif // GTEST_LANG_CXX11
#endif
// GTEST_LANG_CXX11
TEST
(
AnyWithTest
,
TestCompare
)
{
TEST
(
AnyWithTest
,
TestCompare
)
{
EXPECT_THAT
(
SampleAnyType
(
1
),
AnyWith
<
int
>
(
Gt
(
0
)));
EXPECT_THAT
(
SampleAnyType
(
1
),
AnyWith
<
int
>
(
Gt
(
0
)));
}
}
...
@@ -6694,3 +6695,8 @@ TEST(NotTest, WorksOnMoveOnlyType) {
...
@@ -6694,3 +6695,8 @@ TEST(NotTest, WorksOnMoveOnlyType) {
}
// namespace gmock_matchers_test
}
// namespace gmock_matchers_test
}
// namespace testing
}
// namespace testing
#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