From: Jesse Luehrs Date: Sat, 5 Jun 2010 20:47:37 +0000 (-0500) Subject: add todo test for metaclass compat with immutable classes (dougdude) X-Git-Tag: 1.07~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ff7c8abb4ed12f9e5be6670eeaedf38e25052119;p=gitmo%2FMoose.git add todo test for metaclass compat with immutable classes (dougdude) --- diff --git a/t/600_todo_tests/007_immutable_metaclass_compat.t b/t/600_todo_tests/007_immutable_metaclass_compat.t new file mode 100755 index 0000000..a1e8e09 --- /dev/null +++ b/t/600_todo_tests/007_immutable_metaclass_compat.t @@ -0,0 +1,40 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use Test::More; + +{ + package Foo::Base::Meta::Trait; + use Moose::Role; +} + +{ + package Foo::Base; + use Moose; + Moose::Util::MetaRole::apply_metaroles( + for => __PACKAGE__, + class_metaroles => { constructor => ['Foo::Base::Meta::Trait'] }, + ); + __PACKAGE__->meta->make_immutable; +} + +{ + package Foo::Meta::Trait; + use Moose::Role; +} + +{ + package Foo; + use Moose; + Moose::Util::MetaRole::apply_metaroles( + for => __PACKAGE__, + class_metaroles => { constructor => ['Foo::Meta::Trait'] } + ); + ::ok(!Foo->meta->is_immutable); + extends 'Foo::Base'; + { our $TODO; local $TODO = "inheriting makes this immutable"; + ::ok(!Foo->meta->is_immutable); + } +} + +done_testing;