From: Vincent Pit Date: Sat, 14 Feb 2009 21:37:12 +0000 (+0100) Subject: Output what we got when t/30-bad.t fails X-Git-Tag: v1.00~1 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=c28e54f56f6f36e3d6364b1cd07048bb288aa9d7;p=perl%2Fmodules%2FTest-Valgrind.git Output what we got when t/30-bad.t fails --- diff --git a/t/30-bad.t b/t/30-bad.t index 1170587..ac5c9be 100644 --- a/t/30-bad.t +++ b/t/30-bad.t @@ -8,7 +8,7 @@ use Test::More; my $dbg; sub tester { - my ($a, $desc) = @_; + my ($num, $desc) = @_; my $passed; if (!defined $dbg) { eval " @@ -27,19 +27,20 @@ sub tester { } } if ($desc =~ /definitely\s+lost/) { - $passed = $a >= 9900 && $a < 10100; + $passed = $num >= 9900 && $num < 10100; if ($dbg) { ok($passed, $desc); + diag " Got $num instead of 0." unless $passed; } else { TODO: { local $TODO = "Leak count may be off on non-debugging perls"; ok($passed, $desc); } - return 1; + $passed = 1; } } else { - $passed = defined $a && $a == 0; - is($a, 0, $desc); + $passed = defined $num && $num == 0; + is($num, 0, $desc); } return $passed; }