3 ms·
That sounds like you're effectively using it as a test coverage tool to find code paths that aren't being tested, would that be an accurate summary?
by dbaupp 12y ago
That sounds like you're effectively using it as a test coverage tool to find code paths that aren't being tested, would that be an accurate summary?
- nullc 12y agoNot quite, because code can still get run by a test but not be tested. This isn't all that interesting to do except on code that already has ~100% branch coverage. (Since obviously any unexecuted code is going to get removed, and lcov is a lot less work to use :) ) There aren't really any good mutation testing tools for C— e.g. tools to test your tests by breaking your code and making sure your tests fail. C-reduce can be used as a limited kind of mutation test— one that only tests reductions. One nice thing is that for code with 100% coverage any successful reduction is quite often a shortcoming in the tests or a missed optimization in the code, which isn't something you can say for most other kinds of mutations. (except for the fact that c-reduce does a lot of formatting garbling that doesn't really change the code)
- dbaupp 12y agoAh, nice. So it's more like a "semantic coverage" tool, i.e. finding the code paths that don't have any effect on the output.