-
Notifications
You must be signed in to change notification settings - Fork 50
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
Allow specifying default deep-equality comparison options? #212
Comments
I think that would be true of the It was my understadning that I'm also not keen on adding a global registry of cmp options. What I would probably do would be to create an |
From what I can tell, grpc/protobuf generated code didn't used to have any private fields - but the new rewrite they did recently now does. I've opened an issue with them about implementing In practice it turns out the affected codebase only tests protobuf generated structs at the edges - so adding compare options to each DeepEquals was merely annoying, but not too arduous. |
I originally tried pitching this to go-cmp, and they said no because they quite resonably want all comparison to be stateless.
google/go-cmp#241 (comment)
The context from that issue is:
This feels like it might be slightly safer for a test assertion tool, as each "global" would be scoped to the test binary.
The text was updated successfully, but these errors were encountered: