Skip to content
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

Equatables for Result and FrisbeeError #5

Merged
merged 1 commit into from
Jan 7, 2018

Conversation

williamhjcho
Copy link
Collaborator

@williamhjcho williamhjcho commented Jan 5, 2018

  • Moved Equatable extensions from tests to framework
  • Moved Result get-properties extensions to framework
  • Add rest of cases on FrisbeeError: Equatable
  • Add == overload when Entity: Equatable on Result
  • Add Sequence.extensiveCombine on testing target to enable cartesian product of Sequences
    [0,1] x [a, b, c] = [(0,a), (0,b), (0,c), (1,a), (1,b), (1,c)]

@codecov-io
Copy link

codecov-io commented Jan 5, 2018

Codecov Report

Merging #5 into master will increase coverage by 2.25%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #5      +/-   ##
==========================================
+ Coverage   92.78%   95.03%   +2.25%     
==========================================
  Files           6        8       +2     
  Lines          97      141      +44     
  Branches        8       11       +3     
==========================================
+ Hits           90      134      +44     
  Misses          7        7
Impacted Files Coverage Δ
Sources/Frisbee/Entities/FrisbeeError.swift 100% <100%> (ø)
Sources/Frisbee/Entities/Result.swift 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eca6188...ccfa5a9. Read the comment docs.

@ronanrodrigo
Copy link
Owner

These equatables are just use in test target. Do you think it is necessary to move them to production target?

@williamhjcho
Copy link
Collaborator Author

Makes it easier for the future, there is also no need for them to not be equatable

…uatable

Add extensiveCombine on TestTarget to enable cartesian product of Sequences
Copy link
Owner

@ronanrodrigo ronanrodrigo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice @william-wc 👏

}

extension FrisbeeError {
static func all(error: Error) -> [FrisbeeError] {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To simplify this function, maybe error could be just some string. And maybe SomeError doesn't need to exist 🙂

@ronanrodrigo ronanrodrigo merged commit a8da184 into ronanrodrigo:master Jan 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants