in reply to Re: Making open fail
in thread Making open fail
Although I agree that you should try to get a good coverage I wouldn't pursuit the 100% itself. Let's consider the following subroutine
sub divide { my ($a, $b) = @_; return $a / $b; }
You can easily create a test case and get a 100% coverage, and as you might realized the code can still fail ( if $b is 0 you'll get a "Illegal division..." ), here the 100% gives you a false sense of security. On the other hand the more tests your application has the harder it is to change it or refactor it
My point is you shouldn't blindly follow best practices, they are just a guide not a law (use your own criteria). Don't use test coverage as a goal itself, otherwise you would end up writing code to get 100% coverage instead of writing code to perform a task
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Making open fail
by DrHyde (Prior) on Jul 05, 2010 at 10:26 UTC | |
by bluescreen (Friar) on Jul 05, 2010 at 13:15 UTC | |
by SilasTheMonk (Chaplain) on Jul 05, 2010 at 14:50 UTC | |
by bluescreen (Friar) on Jul 05, 2010 at 18:30 UTC | |
|
Re^3: Making open fail
by SilasTheMonk (Chaplain) on Jul 04, 2010 at 21:50 UTC |