Re:Clang vs. GCC – code coverage checking
by viraptor on Saturday April 02, 2016 @07:52PM
(#11414162)
This sounds a bit dangerous. Code coverage works on code, not on data, so if you're testing something like:
// globals
rules_t rules[] = {{1, OK}, {2, FAIL}, {3, THERMONUCLEAR_WAR}};
It sounds like you could change rules 1 and 2 to THERMONUCLEAR_WAR as well and none of the tests would rerun. Is that right?
Other use case is figuring out what tests to re-execute when you change something - you can skip tests that never touch any code you are changing. Can be a time-saver if you have a big test suite or lack finer-grained tests (component/unit).