-
Notifications
You must be signed in to change notification settings - Fork 357
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
test: Comparability and hashability of PackageInfo
and MatchSpec
#3369
test: Comparability and hashability of PackageInfo
and MatchSpec
#3369
Conversation
2ab8714
to
89360de
Compare
@@ -565,7 +565,7 @@ struct std::hash<mamba::util::flat_set<Key, Compare, Allocator>> | |||
{ | |||
auto operator()(const mamba::util::flat_set<Key, Compare, Allocator>& set) const -> std::size_t | |||
{ | |||
return mamba::util::hash_vals(set); | |||
return mamba::util::hash_range(set); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hash_vals
hashes set
as a value rather than its' internal elements (I thought it would).
hash_range
considers set
a range and hashes all of its elements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm actually wondering about the use cases of using hash_vals
, and btw I just realized there are no tests for hash_vals
. Would you mind adding them please? (in this PR or another one, as you prefer).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hash_vals
is used to combine the hashes of individual scalar values. I can open a PR after this one to test its behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please rebase now that #3371 is merged? Thanks.
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
89360de
to
2758eca
Compare
Follow-up of #3363.
This adds just some simply test for
PackageInfo
andMatchSpec
for now.