X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=deb-src%2Flibtest-exception-perl%2Flibtest-exception-perl-0.27%2Ft%2Fisa.t;fp=deb-src%2Flibtest-exception-perl%2Flibtest-exception-perl-0.27%2Ft%2Fisa.t;h=8fa4002cf917b04e52379f7a7806f5ff5ab98ef1;hb=d615bbbf525d490a6803e161c1063da7ee8fb9bc;hp=0000000000000000000000000000000000000000;hpb=5638bd62c66215ffc4830630a7bfcfe5cdf331d7;p=pkg-perl diff --git a/deb-src/libtest-exception-perl/libtest-exception-perl-0.27/t/isa.t b/deb-src/libtest-exception-perl/libtest-exception-perl-0.27/t/isa.t new file mode 100644 index 0000000..8fa4002 --- /dev/null +++ b/deb-src/libtest-exception-perl/libtest-exception-perl-0.27/t/isa.t @@ -0,0 +1,21 @@ +#! /usr/bin/perl -Tw + +use strict; +use warnings; + +use Test::More tests => 1; +use Test::Exception; + +{ + package MockFooException; + + sub new { bless {}, shift }; + sub isa { + my ( $self, $class ) = @_; + return 1 if $class eq 'Foo'; + return $self->SUPER::isa( $class ); + } +} + +throws_ok { die MockFooException->new } 'Foo', + 'Understand exception classes that override isa'; \ No newline at end of file