Regenerate test files
[gitmo/Mouse.git] / t / 010_basics / 020-global-destruction.t
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 Test::More;
10
11 {
12     package Foo;
13     use Mouse;
14
15     sub DEMOLISH {
16         my $self = shift;
17         my ($igd) = @_;
18         ::ok(
19             !$igd,
20             'in_global_destruction state is passed to DEMOLISH properly (false)'
21         );
22     }
23 }
24
25 {
26     my $foo = Foo->new;
27 }
28
29 {
30     package Bar;
31     use Mouse;
32
33     sub DEMOLISH {
34         my $self = shift;
35         my ($igd) = @_;
36         ::ok(
37             !$igd,
38             'in_global_destruction state is passed to DEMOLISH properly (false)'
39         );
40     }
41
42     __PACKAGE__->meta->make_immutable;
43 }
44
45 {
46     my $bar = Bar->new;
47 }
48
49 ok(
50     $_,
51     'in_global_destruction state is passed to DEMOLISH properly (true)'
52 ) for split //, `$^X t/010_basics/020-global-destruction-helper.pl`;
53
54 done_testing;