From: Nicholas Clark Date: Sun, 1 May 2011 21:24:07 +0000 (+0100) Subject: Skip the aelemfast size comparison test for perls which predate the code change. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4c2291544bbe80bcc7a9de30b50c718e66dc9adf;p=p5sagit%2FDevel-Size.git Skip the aelemfast size comparison test for perls which predate the code change. It was merged to maint-5.8 between 5.8.3 and 5.8.4, so 5.8.4 and later have it. For 5.8.3 and earlier, the assumptions the test makes about sizes (based on op structure) are bogus. --- diff --git a/t/code.t b/t/code.t index 3ac711a..f2e1e26 100644 --- a/t/code.t +++ b/t/code.t @@ -30,13 +30,16 @@ cmp_ok(length prototype $anon_proto, '>', 0, 'prototype has a length'); cmp_ok($anon_proto_size, '>', $anon_size + length prototype $anon_proto, 'prototypes add to the size'); -{ +SKIP: { use vars '@b'; my $aelemfast_lex = total_size(sub {my @a; $a[0]}); my $aelemfast = total_size(sub {my @a; $b[0]}); + # This one is sane even before Dave's lexical aelemfast changes: cmp_ok($aelemfast_lex, '>', $anon_size, 'aelemfast for a lexical is handled correctly'); + skip('alemfast was extended to lexicals after this perl was released', 1) + if $] < 5.008004; cmp_ok($aelemfast, '>', $aelemfast_lex, 'aelemfast for a package variable is larger'); }