Commit | Line | Data |
fde8e43f |
1 | #!/usr/bin/env perl |
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; |
5 | use strict; |
6 | use warnings; |
7 | use Test::More; |
8 | use Test::Exception; |
9 | |
10 | { |
11 | package Foo::API; |
12 | use Mouse::Role; |
13 | |
14 | requires 'foo'; |
15 | } |
16 | |
17 | { |
18 | package Foo; |
19 | use Mouse::Role; |
20 | |
21 | has foo => (is => 'ro'); |
22 | |
23 | with 'Foo::API'; |
24 | } |
25 | |
26 | { |
27 | package Foo::Class; |
28 | use Mouse; |
29 | { our $TODO; local $TODO = "role accessors don't satisfy other role requires"; |
30 | ::lives_ok { with 'Foo' } 'requirements are satisfied properly'; |
31 | } |
32 | } |
33 | |
34 | { |
35 | package Bar; |
36 | use Mouse::Role; |
37 | |
38 | requires 'baz'; |
39 | |
40 | has bar => (is => 'ro'); |
41 | } |
42 | |
43 | { |
44 | package Baz; |
45 | use Mouse::Role; |
46 | |
47 | requires 'bar'; |
48 | |
49 | has baz => (is => 'ro'); |
50 | } |
51 | |
52 | { |
53 | package BarBaz; |
54 | use Mouse; |
55 | |
56 | { our $TODO; local $TODO = "role accessors don't satisfy other role requires"; |
57 | ::lives_ok { with qw(Bar Baz) } 'requirements are satisfied properly'; |
58 | } |
59 | } |
60 | |
61 | done_testing; |