xref: /openbsd-src/gnu/usr.bin/perl/cpan/Test-Simple/t/Legacy/Regression/is_capture.t (revision 256a93a44f36679bee503f12e49566c2183f6181)
1use strict;
2use warnings;
3use Test2::Tools::Tiny;
4
5# this test is only relevant under Devel::Cover
6
7require Test::More;
8
9my $destroy = 0;
10sub CountDestroy::DESTROY { $destroy++ }
11
12my $obj = bless {}, 'CountDestroy';
13
14Test::More::is($obj, $obj, 'compare object to itself using is');
15
16undef $obj;
17
18is $destroy, 1, 'undef object destroyed after being passed to is';
19
20done_testing;
21