On Thu, Feb 12, 2009 at 02:20:13PM +0200, Gabor Szabo wrote:
> Hi,
> 
> With the obvious risk of being laughed at, I'd like to ask
> you guys for a good use-case of isnt() in Test::More.
> 
> the one in the docs looks like this:
> 
>  # $foo isn't empty
> isnt( $foo, '',     "Got some foo" );
> 
> 
> which feels such a weak test I don't think I'd write it.

I find

    isnt($foo, undef);

useful as it gives better failure diagnostics than

    ok(defined $foo);

Nicholas Clark

Reply via email to