6 use Test::More tests => 41;
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
32 has_predicate predicate
39 attach_to_class detach_from_class
41 generate_accessor_method
42 generate_reader_method
43 generate_writer_method
44 generate_predicate_method
53 [ sort $meta->get_method_list ],
54 '... our method list matches');
56 foreach my $method_name (@methods) {
57 ok($meta->has_method($method_name), '... Class::MOP::Attribute->has_method(' . $method_name . ')');
61 name accessor reader writer predicate
62 init_arg default associated_class
67 [ sort $meta->get_attribute_list ],
68 '... our attribute list matches');
70 foreach my $attribute_name (@attributes) {
71 ok($meta->has_attribute($attribute_name), '... Class::MOP::Attribute->has_attribute(' . $attribute_name . ')');
74 # We could add some tests here to make sure that
75 # the attribute have the appropriate
76 # accessor/reader/writer/predicate combinations,
77 # but that is getting a little excessive so I
78 # wont worry about it for now. Maybe if I get