Regenerate test files
[gitmo/Mouse.git] / t / 010_basics / 020-global-destruction.t
CommitLineData
60ad2cb7 1#!/usr/bin/perl
fde8e43f 2# This is automatically generated by author/import-moose-test.pl.
3# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4use t::lib::MooseCompat;
60ad2cb7 5
6use strict;
7use warnings;
8
6475f69d 9use Test::More;
60ad2cb7 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
fde8e43f 49ok(
50 $_,
51 'in_global_destruction state is passed to DEMOLISH properly (true)'
52) for split //, `$^X t/010_basics/020-global-destruction-helper.pl`;
60ad2cb7 53
6475f69d 54done_testing;