From: Scott McWhirter Date: Fri, 26 Jun 2009 18:56:01 +0000 (+0100) Subject: Tidy up the tests and make new method classes immutable X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2ecf7bbcac3783ee763d94bb43d4d3f85c90543e;p=gitmo%2FClass-MOP.git Tidy up the tests and make new method classes immutable --- diff --git a/lib/Class/MOP.pm b/lib/Class/MOP.pm index 222db46..47abb3e 100644 --- a/lib/Class/MOP.pm +++ b/lib/Class/MOP.pm @@ -593,7 +593,7 @@ Class::MOP::Method::Inlined->meta->add_attribute( ); ## -------------------------------------------------------- -## Class::MOP::Method::Accessor +## Class::MOP::Method::Attribute Class::MOP::Method::Attribute->meta->add_attribute( Class::MOP::Attribute->new('attribute' => ( @@ -699,8 +699,12 @@ $_->meta->make_immutable( Class::MOP::Method::Accessor Class::MOP::Method::Attribute + Class::MOP::Method::Clearer Class::MOP::Method::Constructor + Class::MOP::Method::Predicate + Class::MOP::Method::Reader Class::MOP::Method::Wrapped + Class::MOP::Method::Writer /; 1; diff --git a/t/000_load.t b/t/000_load.t index c2552c0..8ea2952 100644 --- a/t/000_load.t +++ b/t/000_load.t @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::More tests => 53; +use Test::More tests => 65; BEGIN { use_ok('Class::MOP'); @@ -16,6 +16,10 @@ BEGIN { use_ok('Class::MOP::Method::Generated'); use_ok('Class::MOP::Method::Accessor'); use_ok('Class::MOP::Method::Attribute'); + use_ok('Class::MOP::Method::Reader'); + use_ok('Class::MOP::Method::Writer'); + use_ok('Class::MOP::Method::Clearer'); + use_ok('Class::MOP::Method::Predicate'); use_ok('Class::MOP::Method::Constructor'); use_ok('Class::MOP::Instance'); use_ok('Class::MOP::Object'); @@ -28,6 +32,10 @@ my %METAS = ( 'Class::MOP::Method::Inlined' => Class::MOP::Method::Inlined->meta, 'Class::MOP::Method::Generated' => Class::MOP::Method::Generated->meta, 'Class::MOP::Method::Accessor' => Class::MOP::Method::Accessor->meta, + 'Class::MOP::Method::Reader' => Class::MOP::Method::Reader->meta, + 'Class::MOP::Method::Writer' => Class::MOP::Method::Writer->meta, + 'Class::MOP::Method::Clearer' => Class::MOP::Method::Clearer->meta, + 'Class::MOP::Method::Predicate' => Class::MOP::Method::Predicate->meta, 'Class::MOP::Method::Attribute' => Class::MOP::Method::Attribute->meta, 'Class::MOP::Method::Constructor' => Class::MOP::Method::Constructor->meta, @@ -76,10 +84,14 @@ is_deeply( Class::MOP::Method->meta, Class::MOP::Method::Accessor->meta, Class::MOP::Method::Attribute->meta, + Class::MOP::Method::Clearer->meta, Class::MOP::Method::Constructor->meta, Class::MOP::Method::Generated->meta, Class::MOP::Method::Inlined->meta, + Class::MOP::Method::Predicate->meta, + Class::MOP::Method::Reader->meta, Class::MOP::Method::Wrapped->meta, + Class::MOP::Method::Writer->meta, Class::MOP::Module->meta, Class::MOP::Object->meta, Class::MOP::Package->meta, @@ -99,10 +111,14 @@ is_deeply( Class::MOP::Method Class::MOP::Method::Accessor Class::MOP::Method::Attribute + Class::MOP::Method::Clearer Class::MOP::Method::Constructor Class::MOP::Method::Generated Class::MOP::Method::Inlined + Class::MOP::Method::Predicate + Class::MOP::Method::Reader Class::MOP::Method::Wrapped + Class::MOP::Method::Writer Class::MOP::Module Class::MOP::Object Class::MOP::Package