6 use Test::More tests => 62;
14 my $attr = Class::MOP::Attribute->new('$test');
15 is($attr->meta, Class::MOP::Attribute->meta, '... instance and class both lead to the same meta');
19 my $meta = Class::MOP::Attribute->meta();
20 isa_ok($meta, 'Class::MOP::Class');
26 initialize_instance_slot
27 _set_initial_slot_value
32 has_write_method get_write_method get_write_method_ref
34 has_read_method get_read_method get_read_method_ref
35 has_predicate predicate
39 has_default default is_default_a_coderef
40 has_initializer initializer
64 [ sort $meta->get_method_list ],
66 '... our method list matches');
68 foreach my $method_name (@methods) {
69 ok($meta->has_method($method_name), '... Class::MOP::Attribute->has_method(' . $method_name . ')');
88 [ sort $meta->get_attribute_list ],
90 '... our attribute list matches');
92 foreach my $attribute_name (@attributes) {
93 ok($meta->has_attribute($attribute_name), '... Class::MOP::Attribute->has_attribute(' . $attribute_name . ')');
96 # We could add some tests here to make sure that
97 # the attribute have the appropriate
98 # accessor/reader/writer/predicate combinations,
99 # but that is getting a little excessive so I
100 # wont worry about it for now. Maybe if I get
101 # bored I will do it.