Googletest export
Document the fact that MatchAndExplain(T, MatchResultListener*) is supported. PiperOrigin-RevId: 354172275
This commit is contained in:
		
				
					committed by
					
						
						Dino Radaković
					
				
			
			
				
	
			
			
			
						parent
						
							d114398800
						
					
				
				
					commit
					726118846d
				
			@@ -3618,6 +3618,9 @@ Expected: is divisible by 7
 | 
				
			|||||||
  Actual: 23 (the remainder is 2)
 | 
					  Actual: 23 (the remainder is 2)
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Tip: for convenience, `MatchAndExplain()` can take a `MatchResultListener*`
 | 
				
			||||||
 | 
					instead of `std::ostream*`.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Writing New Polymorphic Matchers
 | 
					### Writing New Polymorphic Matchers
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Expanding what we learned above to *polymorphic* matchers is now just as simple
 | 
					Expanding what we learned above to *polymorphic* matchers is now just as simple
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -67,6 +67,7 @@ namespace testing {
 | 
				
			|||||||
//   1. a class FooMatcherMatcher that implements the matcher interface:
 | 
					//   1. a class FooMatcherMatcher that implements the matcher interface:
 | 
				
			||||||
//     using is_gtest_matcher = void;
 | 
					//     using is_gtest_matcher = void;
 | 
				
			||||||
//     bool MatchAndExplain(const T&, std::ostream*);
 | 
					//     bool MatchAndExplain(const T&, std::ostream*);
 | 
				
			||||||
 | 
					//       (MatchResultListener* can also be used instead of std::ostream*)
 | 
				
			||||||
//     void DescribeTo(std::ostream*);
 | 
					//     void DescribeTo(std::ostream*);
 | 
				
			||||||
//     void DescribeNegationTo(std::ostream*);
 | 
					//     void DescribeNegationTo(std::ostream*);
 | 
				
			||||||
//
 | 
					//
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user