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;
10 $TODO = q{Mouse is not yet completed};
13 use Mouse::Meta::Role::Application;
14 use Mouse::Meta::Role::Composite;
19 has 'foo' => (is => 'rw');
23 has 'bar' => (is => 'rw');
25 package Role::FooConflict;
27 has 'foo' => (is => 'rw');
29 package Role::BarConflict;
31 has 'bar' => (is => 'rw');
33 package Role::AnotherFooConflict;
35 with 'Role::FooConflict';
38 # test simple attributes
40 my $c = Mouse::Meta::Role::Composite->new(
46 isa_ok($c, 'Mouse::Meta::Role::Composite');
48 is($c->name, 'Role::Foo|Role::Bar', '... got the composite role name');
51 Mouse::Meta::Role::Application->new->apply($c);
52 } '... this succeeds as expected';
55 [ sort $c->get_attribute_list ],
57 '... got the right list of attributes'
61 # test simple conflict
63 Mouse::Meta::Role::Application->new->apply(
64 Mouse::Meta::Role::Composite->new(
67 Role::FooConflict->meta,
71 } '... this fails as expected';
73 # test complex conflict
75 Mouse::Meta::Role::Application->new->apply(
76 Mouse::Meta::Role::Composite->new(
80 Role::FooConflict->meta,
81 Role::BarConflict->meta,
85 } '... this fails as expected';
87 # test simple conflict
89 Mouse::Meta::Role::Application->new->apply(
90 Mouse::Meta::Role::Composite->new(
93 Role::AnotherFooConflict->meta,
97 } '... this fails as expected';