From: Matt S Trout Date: Thu, 3 May 2007 17:47:38 +0000 (+0000) Subject: failing test for constructor inlining with Moose class extending MOP class X-Git-Tag: 0_21~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b43a4bcac57e05863237718f08b5ccb379226af3;p=gitmo%2FMoose.git failing test for constructor inlining with Moose class extending MOP class --- diff --git a/t/020_foreign_inheritence.t b/t/020_foreign_inheritence.t index b6ca603..ccf4a57 100644 --- a/t/020_foreign_inheritence.t +++ b/t/020_foreign_inheritence.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 5; +use Test::More tests => 6; use Test::Exception; BEGIN { @@ -36,6 +36,20 @@ BEGIN { } __PACKAGE__->meta->make_immutable(debug => 0); + + package Bucket; + + use metaclass 'Class::MOP::Class'; + + __PACKAGE__->meta->add_attribute('squeegee' => (accessor => 'squeegee')); + + package Old::Bucket::Nose; + + # see http://www.moosefoundation.org/moose_facts.htm + + use Moose; + + extends 'Bucket'; } my $foo_moose = Foo::Moose->new(); @@ -43,4 +57,7 @@ isa_ok($foo_moose, 'Foo::Moose'); isa_ok($foo_moose, 'Elk'); is($foo_moose->no_moose, 'Elk', '... got the right value from the Elk method'); -is($foo_moose->moose, 'Foo', '... got the right value from the Foo::Moose method'); \ No newline at end of file +is($foo_moose->moose, 'Foo', '... got the right value from the Foo::Moose method'); + +lives_ok { Old::Bucket::Nose->meta->make_immutable(debug => 0); } + => 'Immutability on Moose class extending Class::MOP class ok';