-
Notifications
You must be signed in to change notification settings - Fork 32
Code coverage improvement. #241
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
Conversation
XCTAssert(false) | ||
case .failure(OptimizelyError.dataFileVersionInvalid): | ||
|
||
if case .failure(OptimizelyError.dataFileVersionInvalid) = result { |
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.
With this change, we cannot catch error on .success case
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.
Changes made.
@@ -35,29 +35,30 @@ class ConditionLeafTests: XCTestCase { | |||
} | |||
|
|||
func testDecodeSample_Invalid() { | |||
|
|||
var tmpError: Error? |
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.
Just curious why this new change looks better to you with less readability. Either way is fine with me.
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.
It always goes into one of the XCTAssert's, because of which code-cov shows the other two XCTAssert's as uncovered lines. Thats the only reason.
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.
Looks good. One issue found.
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.
LGTM
No description provided.