Commit Graph

11 Commits

Author SHA1 Message Date
Zalathar
3c30fe3423 coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
Zalathar
599f95ecc2 coverage: Include the highest counter ID seen in .cov-map dumps
When making changes that have a large impact on coverage counter creation, this
makes it easier to see whether the number of physical counters has changed.

(The highest counter ID seen in coverage maps is not necessarily the same as
the number of physical counters actually used by the instrumented code, but
it's the best approximation we can get from looking only at the coverage maps,
and it should be reasonably accurate in most cases.)
2024-10-11 21:04:37 +11:00
Zalathar
abc2c702af coverage: Add debugging flag -Zcoverage-options=no-mir-spans
When set, this flag skips the code that normally extracts coverage spans from
MIR statements and terminators. That sometimes makes it easier to debug branch
coverage and MC/DC coverage, because the coverage output is less noisy.

For internal debugging only. If other code changes would make it hard to keep
supporting this flag, remove it.
2024-06-17 21:16:15 +10:00
Zalathar
d01df6f9aa coverage: Simplify counter expressions using simple algebra
Some of these cases currently don't occur in practice, but are included for
completeness, and to avoid having to add them later as branch coverage and
MC/DC coverage start building more complex expressions.
2024-05-14 13:58:40 +10:00
Zalathar
7c87ad0430 coverage: Add branch coverage support for if-let and let-chains 2024-04-30 22:35:55 +10:00
Zalathar
c9dd07dd5e coverage: Add branch coverage support for let-else 2024-04-30 22:35:54 +10:00
Zalathar
3de87feba2 coverage: Branch coverage tests for match arms 2024-04-22 21:55:33 +10:00
Zalathar
7f432dfb23 coverage: Branch coverage test for if-let and let-chains 2024-04-22 21:55:33 +10:00
Zalathar
4f7a47798e coverage: Branch coverage test for let-else 2024-04-22 21:55:33 +10:00
Zalathar
25b9f84413 coverage: Branch coverage tests for lazy boolean operators 2024-04-17 12:32:30 +10:00
Zalathar
40cfc2de77 coverage: Move branch coverage tests into a subdirectory 2024-04-17 11:41:40 +10:00