From: Stevan Little Date: Sat, 24 Nov 2007 16:45:43 +0000 (+0000) Subject: more tests X-Git-Tag: 0_49~11 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=78d9bb3863ec6ddf5537fc9913fba3b170a8b88d;p=gitmo%2FClass-MOP.git more tests --- diff --git a/Changes b/Changes index 30139e7..4ec3cdc 100644 --- a/Changes +++ b/Changes @@ -3,6 +3,7 @@ Revision history for Perl extension Class-MOP. 0.47 Sat. Nov. 24, 2007 * Class::MOP::Attribute - fixed misspelling in get_write_method_ref + - added more tests for this 0.46 Fri. Nov. 23, 2007 * Class::MOP::Class diff --git a/t/022_attribute_duplication.t b/t/022_attribute_duplication.t index 3fa68b1..50d4b22 100644 --- a/t/022_attribute_duplication.t +++ b/t/022_attribute_duplication.t @@ -5,7 +5,7 @@ use warnings; use Scalar::Util; -use Test::More tests => 29; +use Test::More tests => 32; BEGIN { use_ok('Class::MOP'); @@ -47,6 +47,9 @@ one first. ::isa_ok($reader, 'Class::MOP::Method'); ::isa_ok($writer, 'Class::MOP::Method'); + + ::is($reader->fully_qualified_name, 'Foo::get_bar', '... it is the sub we are looking for'); + ::is($writer->fully_qualified_name, 'Foo::set_bar', '... it is the sub we are looking for'); ::is(Scalar::Util::reftype($reader->body), 'CODE', '... it is a plain old sub'); ::is(Scalar::Util::reftype($writer->body), 'CODE', '... it is a plain old sub'); @@ -71,7 +74,9 @@ one first. my $writer = $bar_attr2->get_write_method_ref; ::isa_ok($reader, 'Class::MOP::Method'); - ::ok(!Scalar::Util::blessed($writer), '... the writer method is not blessed though'); + ::ok(!Scalar::Util::blessed($writer), '... the writer method is not blessed though'); + + ::is($reader->fully_qualified_name, 'Foo::assign_bar', '... it is the sub we are looking for'); ::is(Scalar::Util::reftype($reader->body), 'CODE', '... it is a plain old sub'); ::is(Scalar::Util::reftype($writer), 'CODE', '... it is a plain old sub');