Commit | Line | Data |
43d2935a |
1 | #!/usr/bin/perl |
2 | |
3 | use strict; |
4 | use warnings; |
5 | |
3d659f7f |
6 | use Test::More; |
7 | BEGIN { |
8 | eval "use Test::Output;"; |
9 | plan skip_all => "Test::Output is required for this test" if $@; |
3d659f7f |
10 | } |
43d2935a |
11 | |
12 | { |
13 | package Foo; |
14 | use Moose; |
15 | __PACKAGE__->meta->make_immutable; |
16 | } |
c4022d38 |
17 | |
18 | { |
43d2935a |
19 | package Bar; |
20 | use Moose; |
21 | |
22 | extends 'Foo'; |
23 | |
24 | __PACKAGE__->meta->make_immutable; |
25 | __PACKAGE__->meta->make_mutable; |
26 | |
679b294c |
27 | |
28 | # This actually is testing for a bug in Class::MOP that cause |
29 | # Moose::Meta::Method::Constructor to spit out a warning when it |
30 | # shouldn't have done so. The bug was fixed in CMOP 0.75. |
43d2935a |
31 | ::stderr_unlike( |
32 | sub { Bar->meta->make_immutable }, |
33 | qr/Not inlining a constructor/, |
34 | 'no warning that Bar may not have an inlined constructor' |
35 | ); |
36 | } |
37 | |
a28e50e4 |
38 | done_testing; |