code sync
This commit is contained in:
parent
a3509a5aa4
commit
0c17888bcf
@ -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) {
|
|||||||
|
|
||||||
#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;
|
||||||
|
Loading…
Reference in New Issue
Block a user