Modified source files and compiled any and armel versions of packages
[pkg-perl] / deb-src / libtest-exception-perl / libtest-exception-perl-0.27 / t / rt.t
1 #! /usr/bin/perl
2
3 use strict;
4 use warnings;
5 use Test::More 'no_plan';
6 use Test::Exception;
7
8 {   package Foo;
9     use Carp qw( confess );
10     sub an_abstract_method { shift->subclass_responsibility; }
11     sub subclass_responsibility {
12         my $class = shift;
13         my $method = (caller(1))[3];
14         $method =~ s/.*:://;
15         confess( "abstract method '$method' not implemented for $class" );
16     }
17 }
18
19 throws_ok { Foo->an_abstract_method }
20     qr/abstract method 'an_abstract_method'/, 'RT 11846: throws_ok breaks tests that depend on caller stack: working';