Commit | Line | Data |
c47cf415 |
1 | #!/usr/bin/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 | |
6 | use strict; |
7 | use warnings; |
8 | |
9 | use lib 't/lib', 'lib'; |
10 | |
11 | use Test::More; |
12 | $TODO = q{Mouse is not yet completed}; |
13 | use Test::Exception; |
14 | |
15 | |
16 | { |
17 | |
18 | package Bar; |
19 | use Mouse; |
20 | |
21 | ::lives_ok { extends 'Foo' } 'loaded Foo superclass correctly'; |
22 | } |
23 | |
24 | { |
25 | |
26 | package Baz; |
27 | use Mouse; |
28 | |
29 | ::lives_ok { extends 'Bar' } 'loaded (inline) Bar superclass correctly'; |
30 | } |
31 | |
32 | { |
33 | |
34 | package Foo::Bar; |
35 | use Mouse; |
36 | |
37 | ::lives_ok { extends 'Foo', 'Bar' } |
38 | 'loaded Foo and (inline) Bar superclass correctly'; |
39 | } |
40 | |
41 | { |
42 | |
43 | package Bling; |
44 | use Mouse; |
45 | |
46 | ::throws_ok { extends 'No::Class' } |
47 | qr{Can't locate No/Class\.pm in \@INC}, |
48 | 'correct error when superclass could not be found'; |
49 | } |
50 | |
51 | { |
52 | package Affe; |
53 | our $VERSION = 23; |
54 | } |
55 | |
56 | { |
57 | package Tiger; |
58 | use Mouse; |
59 | |
60 | ::lives_ok { extends 'Foo', Affe => { -version => 13 } } |
61 | 'extends with version requirement'; |
62 | } |
63 | |
64 | { |
65 | package Birne; |
66 | use Mouse; |
67 | |
68 | ::throws_ok { extends 'Foo', Affe => { -version => 42 } } |
69 | qr/Affe version 42 required--this is only version 23/, |
70 | 'extends with unsatisfied version requirement'; |
71 | } |
72 | |
73 | done_testing; |