Closed faroman closed 1 year ago
I love this. It's great.
I do wonder if maybe it would be better to do this using type parameter packs? (And similarly, go back to the equal+tuples and reimplement it using type parameter packs - which would be an entirely separate PR).
OTOH, as written, this will support earlier versions of Swift.
Looks like type parameter packs is useless in this case :(\
I've installed Xcode 15 and tried to rewrite equal
function for tuples and arrays of tuple, but got no results. Maybe I don't understand how to implement it in a proper way. Please look in the attached files, maybe you will find a reason why they cannot not be compiled.\
\
Also I fixed swiftlint issues
Looks like type parameter packs is useless in this case :( I've installed Xcode 15 and tried to rewrite equal function for tuples and arrays of tuple, but got no results. Maybe I don't understand how to implement it in a proper way. Please look in the attached files, maybe you will find a reason why they cannot not be compiled.
Bummer. I'll look into redoing this to use parameter packs (if possible) at a later date. For now, this is good and I don't see any reason to block it any more than I have. Thanks for your contribution!
Also I fixed swiftlint issues.
Thanks!
Thanks!
🤝
Added ability to check an array of tuples for equivalence. Nimble provides such API for tuples, but not for arrays of tuples. The new feature was implemented by copy-pasting the
Equal+Tuple.swift
file with the necessary adjustments.Existing behavior was NOT changed, just added new functionality
Nothing was refactored, but extended
EqualTest.swift
with new testsThis change introduced because I use MOCs generator from Sourcery\ which produces arrays of tuples and it will be useful to compare such arrays in a convenient way
[ ] Tests are added into
EqualTest.swift
and successfully passed (via\.test
tool)[ ] Code is documented
[ ] Public API is NOT broken (major version bump is NOT required)
[ ] This is a new feature (minor version bump is desirable)
Unfortunately, there is a lot of duplicated code in the tests, but I can't get rid of it :(