-
Notifications
You must be signed in to change notification settings - Fork 503
Begin improving branch coverage #223
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
Begin improving branch coverage #223
Conversation
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.
A few nits, but LG overall!
src/apps/testapps/testBBox.c
Outdated
west.west += 0.1; | ||
|
||
t_assert(bboxEquals(&bbox, &bbox), "Equals self"); | ||
t_assert(!bboxEquals(&bbox, &north), "Equals different north"); |
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.
Nit: I'd have the assertion messages here express the desired behavior, e.g. Does not equal different north
src/apps/testapps/testCoordIjk.c
Outdated
t_assert(_unitIjkToDigit(&outOfRange) == INVALID_DIGIT, | ||
"Unit IJK out of range"); | ||
t_assert(_unitIjkToDigit(&unnormalizedZero) == CENTER_DIGIT, | ||
"Unit IJK to zero"); |
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.
Nit: Use a different assertion message from &zero
, to explain how this test is different?
src/apps/testapps/testHexRanges.c
Outdated
H3Index* allKrings = calloc(2 * (1 + 6), sizeof(H3Index)); | ||
err = H3_EXPORT(hexRanges)(withPentagon, 2, 1, allKrings); | ||
|
||
t_assert(err != 0, "Error on hexRanges"); |
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.
Nit: Just for clarity, Expected error on hexRanges
?
Begin improving branch coverage
Begin adding additional branch coverage.
A few things I noted:
isfinite
, which is implementation defined and may contain branches. This can cause differences in reported coverage.