From: Vincent Pit Date: Fri, 1 May 2009 11:26:10 +0000 (+0200) Subject: Test helper modules version output overhaul X-Git-Tag: v0.02~2 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=ba8793aed63c1cd66942055b1c2d934bd1c28a9d;p=perl%2Fmodules%2FThread-Cleanup.git Test helper modules version output overhaul --- diff --git a/t/10-join.t b/t/10-join.t index df54d31..0a4ea4d 100644 --- a/t/10-join.t +++ b/t/10-join.t @@ -18,10 +18,12 @@ use threads::shared; use Test::More tests => 5 * (2 + 2) + 1; -use Thread::Cleanup; +BEGIN { + defined and diag "Using threads $_" for $threads::VERSION; + defined and diag "Using threads::shared $_" for $threads::shared::VERSION; +} -diag "Using threads $threads::VERSION"; -diag "Using threads::shared $threads::shared::VERSION"; +use Thread::Cleanup; my %called : shared; my %nums : shared; diff --git a/t/11-detach.t b/t/11-detach.t index 620af76..a91d139 100644 --- a/t/11-detach.t +++ b/t/11-detach.t @@ -18,10 +18,12 @@ use threads::shared; use Test::More tests => 5 * (2 + 2 + 1) + 1; -use Thread::Cleanup; +BEGIN { + defined and diag "Using threads $_" for $threads::VERSION; + defined and diag "Using threads::shared $_" for $threads::shared::VERSION; +} -diag "Using threads $threads::VERSION"; -diag "Using threads::shared $threads::shared::VERSION"; +use Thread::Cleanup; my %called : shared; my %nums : shared; diff --git a/t/20-recurse.t b/t/20-recurse.t index 2e63962..afa72e4 100644 --- a/t/20-recurse.t +++ b/t/20-recurse.t @@ -24,10 +24,13 @@ BEGIN { use Test::More tests => (($num ** ($depth + 1) - 1) / ($num - 1) - 1 ) * (2 + 2) + 1; +BEGIN { + defined and diag "Using threads $_" for $threads::VERSION; + defined and diag "Using threads::shared $_" for $threads::shared::VERSION; +} + use Thread::Cleanup; -diag "Using threads $threads::VERSION"; -diag "Using threads::shared $threads::shared::VERSION"; diag 'This will leak some scalars'; our $x = -1;