Get tests running under -T (cosmetics only)
[p5sagit/namespace-clean.git] / t / 02-inheritance.t
1 use warnings;
2 use strict;
3
4 use lib 't/lib';
5 use Test::More tests => 10;
6
7 use_ok('Inheritance');
8 ok( !InheritanceParent->can('foo'),
9     'function removed in parent' );
10 ok( InheritanceParent->can('bar'),
11     'method still in parent' );
12 is( InheritanceParent->bar, 23,
13     'method works, function still bound' );
14 ok( !Inheritance->can('baz'),
15     'function removed in subclass' );
16 ok( Inheritance->can('qux'),
17     'method still in subclass' );
18 ok( !Inheritance->can('foo'),
19     'parent function not available in subclass' );
20 ok( Inheritance->can('bar'),
21     'parent method available in subclass' );
22 is( Inheritance->bar, 23,
23     'parent method works in subclass' );
24 is( Inheritance->qux, 23,
25     'subclass method calls to parent work' );
26