Commit Graph

5 Commits

Author SHA1 Message Date
Zalathar
f1494425bb coverage: Add #[rustfmt::skip] to tests with non-standard formatting
These tests deliberately use non-standard formatting, so that the line
execution counts reported by `llvm-cov` reveal additional information about
where code regions begin and end.
2024-01-16 15:56:37 +11:00
Zalathar
5764ccc5e8 coverage: Use Waker::noop in async tests 2023-12-15 17:17:20 +11:00
Zalathar
eb2d4cb541 coverage: Skip spans that can't be un-expanded back to the function body
When we extract coverage spans from MIR, we try to "un-expand" them back to
spans that are inside the function's body span.

In cases where that doesn't succeed, the current code just swaps in the entire
body span instead. But that tends to result in coverage spans that are
completely unrelated to the control flow of the affected code, so it's better
to just discard those spans.
2023-12-03 12:35:33 +11:00
Zalathar
a1e2c10b1f coverage: Simplify building coverage expressions based on sums
In some cases we need to prepare a coverage expression that is the sum of an
arbitrary number of other terms. This patch simplifies the code paths that
build those sums.

This causes some churn in the mappings, because the previous code was building
its sums in a somewhat idiosyncratic order.
2023-11-25 12:29:20 +11:00
Zalathar
49127c64d6 coverage: Migrate tests/coverage-map into tests/coverage 2023-11-07 11:15:19 +11:00