Test Coverage - a good thing

jonasbn on 2006-02-20T15:12:03

I am currently preparring a module for shipping to CPAN.

Using Module::Build's testcover, I have been able to get the test suite to cover the codebase 100%.

When I was closing on the 100% I attempted to think up testing strategies for some of the missing ends and I found out that the code I was attempting to test was impossible cases (if statement on condition, which could never be false), so I could delete the code and then I was at one 100 percent :)

Test coverage is good and it actually helps to clean your code for both for testing, but also for readability.