springning / googlemock

Automatically exported from code.google.com/p/googlemock
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

make matchers printable #126

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
gtest's extensible universal value printer allows us to customize how a value 
of a specific type is printed.  Currently it prints a matcher 
(testing::Matcher<T>) as a hex dump, which isn't useful at all.  We should make 
it print something like

  a matcher that matches a value of type int that is greater than 42

when RTTI is on, or

  a matcher that matches a value that is greater than 42

when RTTI is off.

The "is greater than 42" part is obtained from the matcher's DescribeTo() 
method.

This can be useful for debugging complex matcher expressions, but I don't 
expect it to be needed often.  Hence the low priority.

Original issue reported on code.google.com by w...@google.com on 28 Sep 2010 at 5:03