X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Faccessors_xs.t;fp=t%2Faccessors_xs.t;h=63bce8161f76156690af358c41c61000959ee054;hb=40f3dfeb3711b97a0e182ee9ac6910d9f26bb722;hp=b373a94b1c8c7529151dc63ac0cd4e938d060890;hpb=5c87a5b19e42365de81b3ef9cf6af82a74206f0f;p=p5sagit%2FClass-Accessor-Grouped.git diff --git a/t/accessors_xs.t b/t/accessors_xs.t index b373a94..63bce81 100644 --- a/t/accessors_xs.t +++ b/t/accessors_xs.t @@ -58,18 +58,32 @@ for my $tname (qw/accessors.t accessors_ro.t accessors_wo.t/) { local $SIG{__WARN__} = sub { warn @_ unless $_[0] =~ /subroutine .+ redefined/i }; do($tfn); + + 666; }; if ($has_threads) { - threads->create(sub { - threads->create(sub { - $todo->() for (1,2) } - )->join; - $todo->() for (1,2); - })->join for (1,2) + for (1,2) { + is ( + threads->create(sub { + is ( + threads->create(sub { + $todo->(); + })->join, + 666, + 'Innner thread joined ok', + ); + 777; + })->join, + 777, + 'Outer thread joined ok', + ); + + is ($todo->(), 666, "Unthreaded run ok") for (1,2); + } } else { - $todo->() for (1, 2); + is ($todo->(), 666, "Unthreaded run ok") for (1,2); } }