Re: [Perlunit-users] Died?
Status: Beta
Brought to you by:
mca1001
From: Dmitry D. <dd...@ic...> - 2003-10-13 19:37:57
|
Matthew Astley wrote: > > On Sat, Oct 04, 2003 at 12:17:33PM +0400, Dmitry Diskin wrote: > > >>sub test_000_scalar { >> my $self = shift; >> $self->assert(scalar(undef), 0); >>} > > >>This test faild with 'Died' message: > > > Assert takes a boolean and an optional error message. The boolean > 'scalar(undef)' is false, so the assertion fails. The message is > plain '0' in this case, which is fine until the stringify method in > Test::Unit::Exception says (line 35) > > my $message = $self->text || 'Died'; > > ...but "0" would be no more informative anyway. > > >>Can you explain this? Where exactly the exception is? > > > Does that help? Yes, absolutely. Thanks. -- Dmitry. P.S. I have posted a bunch of other questions.. :) |