Commit 0c17888b authored by Gennadiy Civil's avatar Gennadiy Civil
Browse files

code sync
parent a3509a5a
...@@ -5165,13 +5165,17 @@ std::string DescribeMatcher(const M& matcher, bool negation = false) { ...@@ -5165,13 +5165,17 @@ std::string DescribeMatcher(const M& matcher, bool negation = false) {
// Define variadic matcher versions. They are overloaded in // Define variadic matcher versions. They are overloaded in
// gmock-generated-matchers.h for the cases supported by pre C++11 compilers. // gmock-generated-matchers.h for the cases supported by pre C++11 compilers.
template <typename... Args> template <typename... Args>
internal::AllOfMatcher<Args...> AllOf(const Args&... matchers) { internal::AllOfMatcher<typename std::decay<const Args&>::type...> AllOf(
return internal::AllOfMatcher<Args...>(matchers...); const Args&... matchers) {
return internal::AllOfMatcher<typename std::decay<const Args&>::type...>(
matchers...);
} }
template <typename... Args> template <typename... Args>
internal::AnyOfMatcher<Args...> AnyOf(const Args&... matchers) { internal::AnyOfMatcher<typename std::decay<const Args&>::type...> AnyOf(
return internal::AnyOfMatcher<Args...>(matchers...); const Args&... matchers) {
return internal::AnyOfMatcher<typename std::decay<const Args&>::type...>(
matchers...);
} }
template <typename... Args> template <typename... Args>
......
...@@ -2795,6 +2795,7 @@ TEST(ElementsAreTest, HugeMatcherUnordered) { ...@@ -2795,6 +2795,7 @@ TEST(ElementsAreTest, HugeMatcherUnordered) {
#endif // GTEST_LANG_CXX11 #endif // GTEST_LANG_CXX11
// Tests that AnyOf(m1, ..., mn) describes itself properly. // Tests that AnyOf(m1, ..., mn) describes itself properly.
TEST(AnyOfTest, CanDescribeSelf) { TEST(AnyOfTest, CanDescribeSelf) {
Matcher<int> m; Matcher<int> m;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment