X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F30-threads.t;h=32bdf8039ae3205f903d791496204cd65c05ad05;hb=d6f87656b13ebd4ff7b217704daf892642c58b6a;hp=d3dcc3b644b8d29d471bf1ca123681635df70002;hpb=09c7a37f3be8034a8c04c2011208724e04441d83;p=perl%2Fmodules%2FLexical-Types.git diff --git a/t/30-threads.t b/t/30-threads.t index d3dcc3b..32bdf80 100644 --- a/t/30-threads.t +++ b/t/30-threads.t @@ -15,12 +15,18 @@ BEGIN { use threads; -use Test::More tests => 10 * 2; +use Test::More tests => 10 * 2 * (1 + 2); { package Lexical::Types::Test::Tag; - sub TYPEDSCALAR { $_[1] = threads->tid() } + sub TYPEDSCALAR { + my $tid = threads->tid(); + Test::More::is($_[0], __PACKAGE__, "base type is correct in thread $tid"); + Test::More::is($_[2], 'Tag', "original type is correct in thread $tid"); + $_[1] = $tid; + (); + } } { package Tag; }