uber-go / mock

GoMock is a mocking framework for the Go programming language.
Apache License 2.0
1.82k stars 104 forks source link

Improve default failed equality match output to more clearly show diffs #130

Open takaaa220 opened 6 months ago

takaaa220 commented 6 months ago

Hi, maintainers! I would like to express my sincere gratitude for your efforts in maintaining gomock.

Requested feature Is the issue https://github.com/golang/mock/issues/616 resolved? If not, i hope improvement the diffs when tests fails.

I didn't find out whether the problem resolved or not as the original repository has the issue archived and cannot ask there.

Why the feature is needed As showing the original issue, it is often hard to understand and interpret the diffs.

(Optional) Proposed solution i think we can solve this problem by using the method indicated in the following comments:

Alternatively, adding an option to change the default matcher may resolve this, as it would allow for the use of this way.

tmc commented 4 months ago

The current diff output is pretty low readability. Would love to see the https://github.com/golang/mock/issues/616#issuecomment-1081616088 or something similar implemented.