lib/Moose/Meta/Attribute/Native/Trait.pm: factor out some of the namespace resolution...
[gitmo/Moose.git] / t / immutable / immutable_roundtrip.t
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5
6 use Test::More;
7
8 use Test::Requires {
9     'Test::Output' => '0.01', # skip all if not installed
10 };
11
12 {
13     package Foo;
14     use Moose;
15     __PACKAGE__->meta->make_immutable;
16 }
17
18 {
19     package Bar;
20     use Moose;
21
22     extends 'Foo';
23
24     __PACKAGE__->meta->make_immutable;
25     __PACKAGE__->meta->make_mutable;
26
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.
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
38 done_testing;