From: Dave Rolsky Date: Mon, 6 Apr 2009 16:41:33 +0000 (-0500) Subject: Add a failing test to check that destructor inlining is actually happening X-Git-Tag: 0.73_02~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a63e370dbb3c9cf2cf46ce531052d05394a5dba2;p=gitmo%2FMoose.git Add a failing test to check that destructor inlining is actually happening --- diff --git a/t/300_immutable/005_multiple_demolish_inline.t b/t/300_immutable/005_multiple_demolish_inline.t index 53b31a0..781fda2 100644 --- a/t/300_immutable/005_multiple_demolish_inline.t +++ b/t/300_immutable/005_multiple_demolish_inline.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 2; +use Test::More tests => 3; use Test::Exception; @@ -32,6 +32,8 @@ lives_ok { } 'Bar->new()'; lives_ok { - my $bar = Bar->new(); - $bar->meta->make_immutable; -} 'Bar->meta->make_immutable'; \ No newline at end of file + Bar->meta->make_immutable; +} 'Bar->meta->make_immutable'; + +is( Bar->meta->get_method('DESTROY')->package_name, 'Bar', + 'Bar has a DESTROY method in the Bar class (not inherited)' );