-
Notifications
You must be signed in to change notification settings - Fork 49
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
Add iter, keys, and values with Java tests #2
Conversation
I love this change, thank you! Could you rebase onto master so that you get the CI testing changes I just pushed? |
ec33e28
to
47944c1
Compare
Codecov Report
@@ Coverage Diff @@
## master #2 +/- ##
==========================================
+ Coverage 83.1% 85.37% +2.26%
==========================================
Files 5 6 +1
Lines 586 670 +84
==========================================
+ Hits 487 572 +85
+ Misses 99 98 -1
Continue to review full report at Codecov.
|
Rebased and added docs. Let me know if this needs anything else! |
Excellent, thank you! |
I was following part of you stream earlier today and decided to try my hand at porting some of the other Java tests from MapCheck.java.
The contains_key tests were pretty straightforward since you already implemented
contains_key
. Those aret4
andt7
.During the stream, you mentioned that
NodeIter
is a private Iterator which could be the basis for public iterators on keys, values, and entries. I've done that in a new filesrc/iter/iter.rs
with three new structsIter
,Keys
, andValues
(similar tostd::collections::HashMap
). I added some of my own tests for the newiter()
,keys()
, andvalues()
methods and portedittest1
,ittest2
, andittest3
from MapCheck.java.To get the values out of the
NodeIter
, I had to add two more unsafe blocks.I'm still a noob at concurrency and Rust so let me know if there's anything to improve here. I'm using this as a learning experience. Thanks for streaming!