Adam Spiers ([EMAIL PROTECTED]) wrote:
> Think I just found some bad brokenness, although it could be just me
> getting hopelessly confused as my brain gets trampled into mush by a
> quagmire of exceptions and assertions.  I have a testcase:
> 
> sub test_this_should_fail {
>     my $self = shift;
>     $self->assert(sub { $_[0] eq $_[1] or die "$_[0] ne $_[1]" }, 'a', 'b');
> }
> 
> which does not fail.  In fact it behaves identically to
> 
> sub test_this_should_fail {
>     my $self = shift;
>     $self->assert(sub { $_[0] eq $_[1] or die "$_[0] ne $_[1]" }, 'a', 'a');
> }
> 
> Can anyone reproduce with latest CVS?

Ignore that.  The problem is that the die() from within a
Assertion::CodeRef produces an Error::Simple, which gets turned into a
Test::Unit::Failure too far up the stack, so if
test_this_should_fail() is in AssertTest.pm, it won't work with
check_failures().  Argh.  What to do?

_______________________________________________
Perlunit-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/perlunit-devel

Reply via email to