+40
−0
Loading
This is mostly a finger exercise, and an experiment in "what does grcov consider to be coverage". Here's what I've found out... * In grcov's eyes, most #[derive(Foo)] lines count as containing code; but calling any one derived function counts as calling those lines. * Unlike with tarpaulin, it is actually possible to reach 100% grcov line coverage. (Tarpaulin likes to pick "}" lines and tell you that you never reached them; or sometimes it picks expression statements that have the effect of a return, and tells you that they're unreached. Even with these tests, tarpaulin claims that the line coverage of tor-units is only 97.3%.) * In rust, it may be a bit hopeless trying to get high function coverage. Even though we've hit every line of the tor-units crate, the function coverage from its own tests is only 9.38% (55.41% from other crates). I think this is probably due to derived functions, or maybe due to generics getting instantiated? I've got no idea; the denominator for the function coverage lines fluctuates oddly.