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

util: use cmp.Diff to compare structs in tests #136

Merged
merged 10 commits into from
Jan 8, 2025
Merged

Conversation

cuixq
Copy link
Collaborator

@cuixq cuixq commented Dec 20, 2024

cmp.Diff is a better way to compare two structs since the diff is easier to read.
This PR improves the tests by replacing reflect.DeepEqual with cmp.Diff.

@cuixq cuixq marked this pull request as ready for review December 20, 2024 04:35
@cuixq cuixq changed the title util/resolve: do not reflect.DeepEqual with error values util/resolve: do not use reflect.DeepEqual with error values Dec 30, 2024
@cuixq cuixq requested a review from fgalilee January 7, 2025 00:40
@cuixq cuixq changed the title util/resolve: do not use reflect.DeepEqual with error values util: use cmp.Diff to compare structs in tests Jan 7, 2025
util/semver/match_test.go Outdated Show resolved Hide resolved
util/resolve/internal/resolvetest/resolvetest_test.go Outdated Show resolved Hide resolved
@cuixq cuixq merged commit f93802e into google:main Jan 8, 2025
2 checks passed
@cuixq cuixq deleted the fix branch January 8, 2025 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants