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