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