Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

need to print return value last when the default value needs to be returned but isn't set #36

Open
GoogleCodeExporter opened this issue Aug 14, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

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

@GoogleCodeExporter
Copy link
Author

Original comment by w...@google.com on 27 Sep 2010 at 9:20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant