in reply to TDD with Coverage Analysis. Wow.
D::C is cool. I also agree xdg's observations. It can definitely seduce one into obsessing over achieving 100% coverage on all fronts, which, given the current limitations of D::C, is not always reasonable.
In addition to the ones already mentioned, one (admittedly pretty darn obscure) situation I haven't figured out how to cover is code like this:
In tests, the __DIE__ handler would always run within the dynamic scope of an eval, for obvious reasons, so $^S (aka, $EXCEPTIONS_BEING_CAUGHT) will always be true.$SIG{ __DIE__ } = sub { if ( $^S ) { # exceptions being caught } else { # uncoverable? die; } }
Update: I added a die statement to the second branch of the conditional. Thanks to davidrw, whose reply alerted me to the omission.
the lowliest monk
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: TDD with Coverage Analysis. Wow.
by davidrw (Prior) on Aug 27, 2005 at 15:21 UTC | |
by tlm (Prior) on Aug 27, 2005 at 17:20 UTC | |
by davidrw (Prior) on Aug 27, 2005 at 17:32 UTC | |
|
Re^2: TDD with Coverage Analysis. Wow.
by DrWhy (Chaplain) on Aug 29, 2005 at 06:01 UTC | |
by tlm (Prior) on Aug 30, 2005 at 09:18 UTC |