diff options
author | Abseil Team <absl-team@google.com> | 2022-04-26 16:48:24 (GMT) |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-04-26 16:49:03 (GMT) |
commit | 238e4745c62258ca1d2f3c514789205e8419eeee (patch) | |
tree | 9e65c6e2ae24921c5c3b9248b9e57345677d4d75 /googlemock/test/gmock-matchers-arithmetic_test.cc | |
parent | 0498660ea575bfeb4b3b0879fa6aa6904d1df373 (diff) | |
download | googletest-238e4745c62258ca1d2f3c514789205e8419eeee.zip googletest-238e4745c62258ca1d2f3c514789205e8419eeee.tar.gz googletest-238e4745c62258ca1d2f3c514789205e8419eeee.tar.bz2 |
Generalize gmock-matchers_test to handle is_gtest_matcher-style matchers, too.
PiperOrigin-RevId: 444586594
Change-Id: I0de9b40b3773e3047a492f050266967ea935ae3e
Diffstat (limited to 'googlemock/test/gmock-matchers-arithmetic_test.cc')
-rw-r--r-- | googlemock/test/gmock-matchers-arithmetic_test.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/googlemock/test/gmock-matchers-arithmetic_test.cc b/googlemock/test/gmock-matchers-arithmetic_test.cc index ef53baa..a4c1def 100644 --- a/googlemock/test/gmock-matchers-arithmetic_test.cc +++ b/googlemock/test/gmock-matchers-arithmetic_test.cc @@ -429,6 +429,8 @@ void AllOfMatches(int num, const Matcher<int>& m) { EXPECT_TRUE(m.Matches(num + 1)); } +INSTANTIATE_GTEST_MATCHER_TEST_P(AllOfTest); + // Tests that AllOf(m1, ..., mn) matches any value that matches all of // the given matchers. TEST(AllOfTest, MatchesWhenAllMatch) { @@ -552,7 +554,7 @@ TEST(AllOfTest, AllOfMatcherSafelyCastsMonomorphicMatchers) { Matcher<int&> m5 = AllOf(greater_than_5, less_than_10, less_than_10); } -TEST(AllOfTest, ExplainsResult) { +TEST_P(AllOfTestP, ExplainsResult) { Matcher<int> m; // Successful match. Both matchers need to explain. The second @@ -616,6 +618,8 @@ static void AnyOfStringMatches(int num, const Matcher<std::string>& m) { EXPECT_FALSE(m.Matches(std::to_string(num + 1))); } +INSTANTIATE_GTEST_MATCHER_TEST_P(AnyOfTest); + // Tests that AnyOf(m1, ..., mn) matches any value that matches at // least one of the given matchers. TEST(AnyOfTest, MatchesWhenAnyMatches) { @@ -766,7 +770,7 @@ TEST(AnyOfTest, AnyOfMatcherSafelyCastsMonomorphicMatchers) { Matcher<int&> m5 = AnyOf(greater_than_5, less_than_10, less_than_10); } -TEST(AnyOfTest, ExplainsResult) { +TEST_P(AnyOfTestP, ExplainsResult) { Matcher<int> m; // Failed match. Both matchers need to explain. The second |