-
Notifications
You must be signed in to change notification settings - Fork 19
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 some more tests for HMap. #8
Conversation
At this point I think we're covering all the methods, certainly all the ones we are leaning on in the other code.
Codecov Report
@@ Coverage Diff @@
## master #8 +/- ##
==========================================
+ Coverage 84.4% 86.09% +1.68%
==========================================
Files 12 12
Lines 186 187 +1
Branches 13 13
==========================================
+ Hits 157 161 +4
+ Misses 29 26 -3
Continue to review full report at Codecov.
|
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.
one small concern about making a private method public.
@@ -80,6 +83,6 @@ object HMap { | |||
def empty[K[_], V[_]]: HMap[K, V] = | |||
from[K, V](Map.empty[K[_], V[_]]) | |||
|
|||
private def from[K[_], V[_]](m: Map[K[_], V[_]]): HMap[K, V] = | |||
def from[K[_], V[_]](m: Map[K[_], V[_]]): HMap[K, V] = |
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.
do we have to make this public? This is unsafe and defeating the main use of the code (we know that the inner types match for the keys).
It looks like you are just using it to generate HMap
s, but I think we can do that by doing .update
with the right way, no?
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'll make it private[dagon]
-- I'm just using it in tests.
At this point I think we're covering all the methods, certainly all
the ones we are leaning on in the other code.