chalk
chalk copied to clipboard
track test coverage
In #224, @matklad suggested using "test coverage marks" to manually track test coverage:
https://github.com/rust-analyzer/rust-analyzer/blob/ef782adc293deb287128f005dbab2038ba3ccdc1/crates/test_utils/src/marks.rs
This seems like a great idea, although I wonder if we can come up with a better system for test coverage. There is a bit of a complication here in that we want to test (a) that lowering triggered and (b) that the rules that resulted were well tested. This may require some thought!
We recently re-implemented our coverage marks on top of linker hacks, the UX is quite nice:
https://github.com/rust-analyzer/rust-analyzer/blob/46d4487b8900324fc6a523c8b6ebe036d28fd0fb/crates/test_utils/src/mark.rs
Ah, very cool. Is that available in some sort of re-usable crate?
@nikomatsakis https://github.com/matklad/cov-mark, https://crates.io/crates/cov-mark
though, for rust-analyzer, we use a copy-pasted impl, just because we already have a crate with "assorted test utils".