X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Frecurse.t;h=2b2e1668a51a5c0b16c0de7bf9530935c788ac54;hb=e7d68377a1b22679251b1906740296455bb0f8c6;hp=77111523b3dc2f2468fada8746eee60fcc12f2c8;hpb=9929f0c6089aff07a23c9fe5bbd413e06e908c32;p=p5sagit%2FDevel-Size.git 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,