4 ms·
I think the poster was saying that proper unit testing would give false positives. Example: If I have a "dead" add() function with a unit test that asserts add
by eduren 9y ago
I think the poster was saying that proper unit testing would give false positives.
Example: If I have a "dead" add() function with a unit test that asserts add(2,2) == 4, then code coverage would report that function being covered even if no other part of the codebase uses it anymore.
- gknoy 9y agoThat's exactly what I was trying to say -- thanks! I still _want_ that kind of test coverage, esp when there's weird edge cases, but when looking for dead code, it's probably good to look at only the acceptance / integration tests (or whatever you want to call the tests that do the holistic "I click here and everything works" tests).