X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F014_attribute_introspection.t;h=c8a486476f28f44b7d8ea68bd0ad58ff7d3ad123;hb=860f85abed70a4947fb698784aa94252324d770d;hp=368494bffb885f906c25e9b78996351a90568abd;hpb=1d68af0454f55a8b088f8bc1887a0a5ce54d2a22;p=gitmo%2FClass-MOP.git diff --git a/t/014_attribute_introspection.t b/t/014_attribute_introspection.t index 368494b..c8a4864 100644 --- a/t/014_attribute_introspection.t +++ b/t/014_attribute_introspection.t @@ -1,14 +1,10 @@ -#!/usr/bin/perl - use strict; use warnings; -use Test::More tests => 54; +use Test::More tests => 64; use Test::Exception; -BEGIN { - use_ok('Class::MOP'); -} +use Class::MOP; { my $attr = Class::MOP::Attribute->new('$test'); @@ -20,29 +16,37 @@ BEGIN { isa_ok($meta, 'Class::MOP::Class'); my @methods = qw( - meta - new clone + new + clone initialize_instance_slot + _set_initial_slot_value name - has_accessor accessor - has_writer writer get_write_method - has_reader reader get_read_method - has_predicate predicate - has_clearer clearer - has_builder builder - has_init_arg init_arg - has_default default is_default_a_coderef + has_accessor accessor + has_writer writer + has_write_method get_write_method get_write_method_ref + has_reader reader + has_read_method get_read_method get_read_method_ref + has_predicate predicate + has_clearer clearer + has_builder builder + has_init_arg init_arg + has_default default is_default_a_coderef + has_initializer initializer + + definition_context slots get_value set_value + set_initial_value has_value clear_value associated_class - attach_to_class detach_from_class + attach_to_class + detach_from_class accessor_metaclass @@ -52,6 +56,8 @@ BEGIN { process_accessors install_accessors remove_accessors + + _new ); is_deeply( @@ -64,18 +70,20 @@ BEGIN { } my @attributes = ( - '$!name', - '$!accessor', - '$!reader', - '$!writer', - '$!predicate', - '$!clearer', - '$!builder', - '$!init_arg', - '$!default', - '$!associated_class', - '@!associated_methods', - ); + 'name', + 'accessor', + 'reader', + 'writer', + 'predicate', + 'clearer', + 'builder', + 'init_arg', + 'initializer', + 'definition_context', + 'default', + 'associated_class', + 'associated_methods', + ); is_deeply( [ sort $meta->get_attribute_list ],