Convert all tests to done_testing.
[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 }
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;