When GoogleMock sees an unexpected call, it prints out
information in the following order:
1. Which function is being called and with what arguments,
2. What value it returns, and
3. What expectations gMock has tried to match the call with.
The reason for picking this order is that #1 and #2 are usually short
while #3 can be very lengthy. If we print #3 before #2, it can be
very hard to tell where #3 ends and spot the function's return value,
which in my opinion is bad user experience.
This usually works fine. However, if the function returns a class type, no
default action is set for it, and no default value is set for the return
type, the program will crash in
step #2, and #3 never gets a chance to be printed.
It should be possible for GoogleMock to do #3 before #2 when no default
return value is set.
Original issue reported on code.google.com by zhanyong...@gmail.com on 4 Mar 2009 at 7:09
Original issue reported on code.google.com by
zhanyong...@gmail.com
on 4 Mar 2009 at 7:09