From: Nicholas Clark Date: Tue, 24 Mar 2015 20:05:48 +0000 (+0100) Subject: Avoid t/recurse.t failing on earlier versions on 32 bit platforms. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FDevel-Size.git;a=commitdiff_plain;h=e7d68377a1b22679251b1906740296455bb0f8c6 Avoid t/recurse.t failing on earlier versions on 32 bit platforms. Subroutines used to be smaller than its hard-coded assumption. --- diff --git a/CHANGES b/CHANGES index 81317dc..8db209d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ Revision history for Perl extension Devel::Size. -0.79_53 2015-03-21 nicholas +0.79_53 2015-03-25 nicholas + * Avoid t/recurse.t failing on earlier versions on 32 bit platforms + (subroutines are smaller than it assumes) 0.79_52 2015-03-20 nicholas two patches from Zefram: diff --git a/t/recurse.t b/t/recurse.t index 7711152..2b2e166 100644 --- a/t/recurse.t +++ b/t/recurse.t @@ -9,6 +9,7 @@ use Test::More; use strict; use Devel::Size ':all'; +use Config; my %types = ( NULL => undef, @@ -365,7 +366,8 @@ sub cmp_array_ro { { # This used to be total_size(\&cmp_array_ro); my $sub_size = total_size(\&SWIT::sees_test_more); - cmp_ok($sub_size, '>=', 2048, 'subroutine is at least 2K'); + my $want = 1.5 + 0.125 * $Config{ptrsize}; + cmp_ok($sub_size, '>=', $want, "subroutine is at least ${want}K"); cmp_ok($sub_size, '<=', 51200, 'subroutine is no more than 50K') or diag 'Is total_size() dragging in the entire symbol table?'; cmp_ok(total_size(\%Test::More::), '>=', 102400,