-
Notifications
You must be signed in to change notification settings - Fork 243
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
fix: check key values, not get
return for haskey(k, orderedrobindict)
#858
Conversation
I discovered the same problem in |
Okay, I didn't understand the code as well as I should have on my first pass. I fixed setindex! to use I also |
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.
Thanks for fixing. LGTM. Minor comment for adding a testset.
test/test_ordered_robin_dict.jl
Outdated
@@ -139,6 +139,8 @@ | |||
@test h["a","b"] == h[("a","b")] == 4 | |||
h["a","b","c"] = 4 | |||
@test h["a","b","c"] == h[("a","b","c")] == 4 | |||
h["b"] = missing | |||
@test 5 == (h["b"] = 5) | |||
end | |||
|
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 add a testset (you can name the testset "Fixes issue 857") corresponding to fixed scenarios that you mentioned here
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 rolled back all the changes to the tests and consolidated all the changes under a single testset!
…t) (#858) * fix: check key values, not `get` return for haskey(k, orderedrobindict) * Fix: use isequal in setindex! * re-fix: use `get` for `in keys()` but descend to the actual id-dict * Remove accidental paste in docstring * consolidate tests for issue under testset --------- Co-authored-by: Micah Rufsvold <mjrufsvold@mathematica-mpr.com>
Resolves #857
I am not sure if checking if the key appears in the key vector property is the right way to go. Open to another solution!