Files
crapper/tests
Cursor AgentandRobert C. Martin 3b018d8548 Record each Swift coverage region's end line.
A region was only (start line, count), so a span of lines 4-5 with count 1
never marked line 5 covered. Regions are now (start_line, end_line, count).
SwiftFile.line_covered(line) is true when the innermost region containing
that line has a count above zero, so a nested zero-count region leaves its
lines uncovered. A segment is still one line. CRAP still counts each region
once, when its start line lies in the function.

Proved by the span, innermost-region, segment, xccov, and CRAP snapshot tests.
The choose fixture stays at 50% coverage and CRAP 2.5.

Co-authored-by: Robert C. Martin <[email protected]>
2026-11-26 01:37:08 +00:00
..