From: Vincent Pit Date: Fri, 3 Jul 2009 20:58:22 +0000 (+0200) Subject: Correct failing tests locations X-Git-Tag: v0.08~7 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FLexical-Types.git;a=commitdiff_plain;h=1a89808e0eb3e27e0d2b61d0bfa84fa8ab94b9cb Correct failing tests locations --- diff --git a/t/11-args.t b/t/11-args.t index eefa32e..26aa4b6 100644 --- a/t/11-args.t +++ b/t/11-args.t @@ -10,6 +10,7 @@ use Test::More tests => 14 + 6; sub TYPEDSCALAR { $_[1] = (caller(0))[2]; + local $Test::Builder::Level = $Test::Builder::Level + 1; Test::More::is($_[2], 'LTT', 'original type is ok'); (); } @@ -126,7 +127,7 @@ use Test::More tests => 14 + 6; } { - my $expect = qr/^coconut at \Q$0\E line 30/; + my $expect = qr/^coconut at \Q$0\E line 31/; local $@; eval q[ use Lexical::Types; diff --git a/t/12-integrate.t b/t/12-integrate.t index 3b32ff1..ab5df98 100644 --- a/t/12-integrate.t +++ b/t/12-integrate.t @@ -23,12 +23,14 @@ use Test::More tests => 5 + 4; sub new_str { $_[1] = 'str:' . (caller(0))[2]; + local $Test::Builder::Level = $Test::Builder::Level + 1; Test::More::is($_[2], 'Str', 'original type is correct'); (); } sub new_int { $_[1] = (caller(0))[2]; + local $Test::Builder::Level = $Test::Builder::Level + 1; Test::More::is($_[2], 'Int', 'original type is correct'); (); } diff --git a/t/22-magic.t b/t/22-magic.t index c6a517c..350cbe1 100644 --- a/t/22-magic.t +++ b/t/22-magic.t @@ -48,6 +48,7 @@ sub check (&$$;$) { } else { eval { $test->() }; } + local $Test::Builder::Level = $Test::Builder::Level + 1; is_deeply $got, $exp, $desc; } return $want ? @ret : $ret[0]; diff --git a/t/23-magic-uvar.t b/t/23-magic-uvar.t index 1e24d25..28422b0 100644 --- a/t/23-magic-uvar.t +++ b/t/23-magic-uvar.t @@ -53,6 +53,7 @@ sub check (&$$;$) { } else { eval { $test->() }; } + local $Test::Builder::Level = $Test::Builder::Level + 1; is_deeply $got, $exp, $desc; } return $want ? @ret : $ret[0]; diff --git a/t/30-threads.t b/t/30-threads.t index 3f46124..aa42d69 100644 --- a/t/30-threads.t +++ b/t/30-threads.t @@ -34,6 +34,7 @@ BEGIN { my $tid = threads->tid(); my ($file, $line) = (caller(0))[1, 2]; my $where = "at $file line $line in thread $tid"; + local $Test::Builder::Level = $Test::Builder::Level + 1; Test::More::is($_[0], __PACKAGE__, "base type is correct $where"); Test::More::is($_[2], 'Tag', "original type is correct $where"); $_[1] = $tid;