From: Artur Bergman Date: Sat, 7 Jun 2003 13:07:53 +0000 (+0000) Subject: Remove warnings from tests. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a31a65c0bb15a314af697dcdcc79bc9e66e65a12;p=p5sagit%2Fp5-mst-13.2.git Remove warnings from tests. p4raw-id: //depot/perl@19706 --- diff --git a/ext/threads/t/basic.t b/ext/threads/t/basic.t index c228d70..09a148d 100755 --- a/ext/threads/t/basic.t +++ b/ext/threads/t/basic.t @@ -117,6 +117,7 @@ ok(14, 0 == threads->self->tid(),"Check so that tid for threads work for main th ok(15, 0 == threads->tid(),"Check so that tid for threads work for main thread"); { + no warnings; local *CLONE = sub { ok(16, threads->tid() == 9, "Tid should be correct in the clone")}; threads->create(sub { ok(17, threads->tid() == 9, "And tid be 9 here too") })->join(); } diff --git a/ext/threads/t/end.t b/ext/threads/t/end.t index dd26042..19cd704 100644 --- a/ext/threads/t/end.t +++ b/ext/threads/t/end.t @@ -32,7 +32,7 @@ sub ok { $test_id++; return $ok; } -ok(1); +ok(1,''); END { ok(1,"End block run once") } threads->create(sub { eval "END { ok(1,'') }"})->join(); threads->create(sub { eval "END { ok(1,'') }"})->join(); diff --git a/ext/threads/t/join.t b/ext/threads/t/join.t index bcd813d..3818e49 100644 --- a/ext/threads/t/join.t +++ b/ext/threads/t/join.t @@ -43,11 +43,11 @@ ok(1,""); { my ($thread) = threads->create(sub { return (1,2,3) }); my @retval = $thread->join(); - ok($retval[0] == 1 && $retval[1] == 2 && $retval[2] == 3); + ok($retval[0] == 1 && $retval[1] == 2 && $retval[2] == 3,''); } { my $retval = threads->create(sub { return [1] })->join(); - ok($retval->[0] == 1,"Check that a array ref works"); + ok($retval->[0] == 1,"Check that a array ref works",); } { my $retval = threads->create(sub { return { foo => "bar" }})->join(); @@ -69,15 +69,15 @@ ok(1,""); { my $test = "hi"; my $retval = threads->create(sub { return $_[0]}, \$test)->join(); - ok($$retval eq 'hi'); + ok($$retval eq 'hi',''); } { my $test = "hi"; share($test); my $retval = threads->create(sub { return $_[0]}, \$test)->join(); - ok($$retval eq 'hi'); + ok($$retval eq 'hi',''); $test = "foo"; - ok($$retval eq 'foo'); + ok($$retval eq 'foo',''); } { my %foo; diff --git a/ext/threads/t/list.t b/ext/threads/t/list.t index 193546f..f8f82d2 100644 --- a/ext/threads/t/list.t +++ b/ext/threads/t/list.t @@ -34,21 +34,21 @@ sub ok { return $ok; } -ok(2, scalar @{[threads->list]} == 0); +ok(2, scalar @{[threads->list]} == 0,''); threads->create(sub {})->join(); -ok(3, scalar @{[threads->list]} == 0); +ok(3, scalar @{[threads->list]} == 0,''); my $thread = threads->create(sub {}); -ok(4, scalar @{[threads->list]} == 1); +ok(4, scalar @{[threads->list]} == 1,''); $thread->join(); -ok(5, scalar @{[threads->list]} == 0); +ok(5, scalar @{[threads->list]} == 0,''); -$thread = threads->create(sub { ok(6, threads->self == (threads->list)[0])}); +$thread = threads->create(sub { ok(6, threads->self == (threads->list)[0],'')}); threads->yield; # help out non-preemptive thread implementations sleep 1; -ok(7, $thread == (threads->list)[0]); +ok(7, $thread == (threads->list)[0],''); $thread->join(); -ok(8, scalar @{[threads->list]} == 0); +ok(8, scalar @{[threads->list]} == 0,'');