From: Jesse Luehrs Date: Sat, 3 Apr 2010 00:51:57 +0000 (-0500) Subject: immutability todo tests (t0m) X-Git-Tag: 1.05~18 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f4eea4135e38dc6145e78a5c4908622b833a8f2b;p=gitmo%2FMoose.git immutability todo tests (t0m) --- diff --git a/t/050_metaclasses/052_metaclass_compat.t b/t/050_metaclasses/052_metaclass_compat.t index 2b9a346..8e71ee5 100644 --- a/t/050_metaclasses/052_metaclass_compat.t +++ b/t/050_metaclasses/052_metaclass_compat.t @@ -57,4 +57,27 @@ ok(Foo::Sub->meta->constructor_class->meta->can('does_role') && Foo::Sub->meta->constructor_class->meta->does_role('Foo::Trait::Constructor'), "subclass inherits constructor traits"); +{ + package Foo2::Role; + use Moose::Role; +} +{ + package Foo2; + use Moose -traits => ['Foo2::Role']; + __PACKAGE__->meta->make_immutable; +} +{ + package Bar2; + use Moose; +} +{ + package Baz2; + use Moose; + my $meta = __PACKAGE__->meta; + $meta->superclasses('Foo2'); + { our $TODO; local $TODO = "need to handle immutability better"; + ::lives_ok { $meta->superclasses('Bar2') }; + } +} + done_testing;