mirror of
https://github.com/google/googletest.git
synced 2025-11-13 08:15:04 -05:00
Use matcher's description in AllOf if matcher has no explanation.
PiperOrigin-RevId: 655569834 Change-Id: Ia760d74d1cdde766e9719864c5e19c0159da3128
This commit is contained in:
committed by
Copybara-Service
parent
352788321f
commit
5bcb2d78a1
@@ -2333,9 +2333,11 @@ TEST(ExplainMatchResultTest, AllOf_True_True) {
|
||||
EXPECT_EQ("which is 0 modulo 2, and which is 0 modulo 3", Explain(m, 6));
|
||||
}
|
||||
|
||||
// Tests that when AllOf() succeeds, but matchers have no explanation,
|
||||
// the matcher description is used.
|
||||
TEST(ExplainMatchResultTest, AllOf_True_True_2) {
|
||||
const Matcher<int> m = AllOf(Ge(2), Le(3));
|
||||
EXPECT_EQ("", Explain(m, 2));
|
||||
EXPECT_EQ("is >= 2, and is <= 3", Explain(m, 2));
|
||||
}
|
||||
|
||||
INSTANTIATE_GTEST_MATCHER_TEST_P(ExplainmatcherResultTest);
|
||||
|
||||
Reference in New Issue
Block a user