X-Git-Url: http://git.maemo.org/git/?p=dh-make-perl;a=blobdiff_plain;f=dev%2Farm%2Flibtest-exception-perl%2Flibtest-exception-perl-0.27%2Ft%2Fisa.t;fp=dev%2Farm%2Flibtest-exception-perl%2Flibtest-exception-perl-0.27%2Ft%2Fisa.t;h=8fa4002cf917b04e52379f7a7806f5ff5ab98ef1;hp=0000000000000000000000000000000000000000;hb=f477fa73365d491991707e7ed9217b48d6994551;hpb=da95c414033799c3a62606f299c3c00b5c77ca11 diff --git a/dev/arm/libtest-exception-perl/libtest-exception-perl-0.27/t/isa.t b/dev/arm/libtest-exception-perl/libtest-exception-perl-0.27/t/isa.t new file mode 100644 index 0000000..8fa4002 --- /dev/null +++ b/dev/arm/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