diff options
author | Jesse Luehrs <doy@tozt.net> | 2011-12-10 16:00:09 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2011-12-10 16:02:22 -0600 |
commit | 672ffdba4da7d100f0377139c087ea63c0f24ecd (patch) | |
tree | 91c8725de06a2fc4e6ff2a9a708c05d5cc7944b8 | |
parent | fe08abc6ffcbbc3f827fe53ed99c9868e2d2bc7b (diff) | |
download | package-stash-xs-672ffdba4da7d100f0377139c087ea63c0f24ecd.tar.gz package-stash-xs-672ffdba4da7d100f0377139c087ea63c0f24ecd.zip |
here's that test failure
-rw-r--r-- | t/isa.t | 35 |
1 files changed, 31 insertions, 4 deletions
@@ -12,11 +12,38 @@ use Package::Stash; { package Bar; + sub bar { } } -my $stash = Package::Stash->new('Foo'); -my @ISA = ('Bar'); -@{$stash->get_or_add_symbol('@ISA')} = @ISA; -isa_ok('Foo', 'Bar'); +{ + my $stash = Package::Stash->new('Foo'); + my @ISA = ('Bar'); + @{$stash->get_or_add_symbol('@ISA')} = @ISA; + isa_ok('Foo', 'Bar'); + isa_ok(bless({}, 'Foo'), 'Bar'); +} + +{ + package Baz; + sub foo { } +} + +{ + my $stash = Package::Stash->new('Quux'); + { + my $isa = $stash->get_or_add_symbol('@ISA'); + @$isa = ('Baz'); + isa_ok('Quux', 'Baz'); + isa_ok(bless({}, 'Quux'), 'Baz'); + ok(Quux->can('foo')); + } + { + my $isa = $stash->get_or_add_symbol('@ISA'); + @$isa = ('Bar'); + isa_ok('Quux', 'Bar'); + isa_ok(bless({}, 'Quux'), 'Bar'); + ok(Quux->can('bar')); + } +} done_testing; |