From: Vincent Pit Date: Wed, 25 Feb 2009 10:40:45 +0000 (+0100) Subject: Test for the base package name correctness in threads X-Git-Tag: v0.02~3 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FLexical-Types.git;a=commitdiff_plain;h=d6f87656b13ebd4ff7b217704daf892642c58b6a Test for the base package name correctness in threads --- 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; }