You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Undercover does not show any red in the output, other than the initial "loc" line, and there are no "hits: 0/" or "branches: 0/" lines. Every line that is not "hits: n/a" is green.
The text was updated successfully, but these errors were encountered:
gc-tim
changed the title
undercover reports <100% method coverage even though it appears to be 100%
undercover reports <100% method coverage even though it appears by eye to be 100%
Feb 21, 2022
Thank you for reporting this and sharing both the method snippet and related lcov. I suspect there could be an issue with how line coverage is interpreted in one or more of the multi-line statements...
Above bug could potentially live in Undercover::Result#uncovered? and Undercover::Result#coverage_f
That sounds very likely. A few days ago I encountered a similar issue where undercover was saying that coverage was below 100%, but its output showed all branches visited.
I eventually put a multi-line function call onto one line, and then it started to show branches: 3/4 on that line. One of the arguments was foo&.fun (with a safe navigation operator). It looks like that was the issue here as well, as I can now see key_a: arg_b&.key_a on line 156.
As for the specifics of how Undercover deals (or does not) with this case, I am afraid that I have no idea. 😂
Undercover does not show any red in the output, other than the initial "loc" line, and there are no "hits: 0/" or "branches: 0/" lines. Every line that is not "hits: n/a" is green.
Output from undercover:
Relevant lines from lcov file:
The text was updated successfully, but these errors were encountered: