I updated to Xcode 13 and noticed that the coverage report is not considering some lines like guard
, ??
operator, curly braces...
It made the overall coverage decrease a lot without a change. Is anyone facing this issue? Is there a solution?
I updated to Xcode 13 and noticed that the coverage report is not considering some lines like guard
, ??
operator, curly braces...
It made the overall coverage decrease a lot without a change. Is anyone facing this issue? Is there a solution?
I can confirm the behavior you describe.
In Xcode 12.5.1:
It correctly shows that both of these methods only have partial coverage (when, of course, you’re only testing one path of execution).
But Xcode 13.0 suggests no coverage for that nil
coalescing scenario, even though it really is partially covered:
Clearly, one should attempt to test both scenarios to ensure complete coverage (at which point Xcode 13 will properly indicate this), but this would appear to be a bug in the rendering of the partial coverage, in certain cases, in Xcode 13.0.