2 # This is automatically generated by author/import-moose-test.pl.
3 # DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4 use t::lib::MooseCompat;
36 with qw( Role::A Role::B );
62 for my $thing ( 'Foo', Foo->new, 'Foo::Child', Foo::Child->new ) {
63 my $name = ref $thing ? (ref $thing) . ' object' : "$thing class";
64 $name .= ' (immutable)' if $thing->meta->is_immutable;
67 !$thing->does('Role::A'),
68 "$name does not do Role::A"
71 !$thing->does('Role::B'),
72 "$name does not do Role::B"
76 !$thing->does( Role::A->meta ),
77 "$name does not do Role::A (passed as object)"
80 !$thing->does( Role::B->meta ),
81 "$name does not do Role::B (passed as object)"
85 !$thing->DOES('Role::A'),
86 "$name does not do Role::A (using DOES)"
89 !$thing->DOES('Role::B'),
90 "$name does not do Role::B (using DOES)"
94 for my $thing ( 'Bar', Bar->new, 'Bar::Child', Bar::Child->new ) {
95 my $name = ref $thing ? (ref $thing) . ' object' : "$thing class";
96 $name .= ' (immutable)' if $thing->meta->is_immutable;
99 $thing->does('Role::A'),
103 !$thing->does('Role::B'),
104 "$name does not do Role::B"
108 $thing->does( Role::A->meta ),
109 "$name does Role::A (passed as object)"
112 !$thing->does( Role::B->meta ),
113 "$name does not do Role::B (passed as object)"
117 $thing->DOES('Role::A'),
118 "$name does Role::A (using DOES)"
121 !$thing->DOES('Role::B'),
122 "$name does not do Role::B (using DOES)"
126 for my $thing ( 'Baz', Baz->new, 'Baz::Child', Baz::Child->new ) {
127 my $name = ref $thing ? (ref $thing) . ' object' : "$thing class";
128 $name .= ' (immutable)' if $thing->meta->is_immutable;
131 $thing->does('Role::A'),
135 $thing->does('Role::B'),
140 $thing->does( Role::A->meta ),
141 "$name does Role::A (passed as object)"
144 $thing->does( Role::B->meta ),
145 "$name does Role::B (passed as object)"
149 $thing->DOES('Role::A'),
150 "$name does Role::A (using DOES)"
153 $thing->DOES('Role::B'),
154 "$name does Role::B (using DOES)"
159 qw( Foo Bar Baz Foo::Child Bar::Child Baz::Child );