On 14/03/07, David Cantrell <[EMAIL PROTECTED]> wrote:
Michael G Schwern wrote:

> First thing is breaks, and probably most important:  No warnings.

Any test suite that blithely ignores warnings is BROKEN.

There are two types of warning.  First, those which you deliberately
spit out, like "use of foo() is deprecated, please use bar() instead".
Your tests need to exercise that warning, so need to somehow capture
them and check that they're spat out at the right time.  If you don't do
that, you're not testing properly.

The second type of warning is the one that tells you when you the author
have fucked up, like, when you say "my $variable" twice, or saying
"$variable = 'one thing'" and "$varable = 'something else'".  I deal
with those by having $SIG{__WARN__} turn them into die()s in the tests.
  If you don't deal with them, you're saying that you don't care about
tripping yourself up in the future.

use Test::NoWarnings;

F


--
David Cantrell

Reply via email to