calvert1991/googlemock

make matchers printable

Opened this issue · 0 comments

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