-
Notifications
You must be signed in to change notification settings - Fork 112
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
Improve code coverage of auxiliary types #43
Improve code coverage of auxiliary types #43
Conversation
Codecov Report
@@ Coverage Diff @@
## master #43 +/- ##
=========================================
+ Coverage 54.2% 55.4% +1.19%
=========================================
Files 29 29
Lines 1402 1397 -5
=========================================
+ Hits 760 774 +14
+ Misses 642 623 -19
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.
I'm a bit worried about new uniqueKeysWithValues
Dictionary initialiser which I think changes behaviour of overlapping keys in keyed containers. Could you please clarify if this is a desired behaviour and add test coverage for the behaviour you'd like to settle with? Thanks.
elements = Dictionary(elementsByKey) { existingElements, newElements in | ||
existingElements + newElements | ||
} | ||
elements = Dictionary(uniqueKeysWithValues: elementsByKey) |
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.
from what I see this new code has a different meaning: values with matching keys will be overwritten with new values, while in the old version these values are merged. Is this something we'd definitely like to do?
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.
The keys are retrieved from another KeyedBox
via box.elements.map { key, box in … }
.
No additional keys are being introduced. As such the keys remain unique. :)
No description provided.