diff options
author | Artur Bergman <sky@nanisky.com> | 2003-06-07 13:07:53 +0000 |
---|---|---|
committer | Artur Bergman <sky@nanisky.com> | 2003-06-07 13:07:53 +0000 |
commit | a31a65c0bb15a314af697dcdcc79bc9e66e65a12 (patch) | |
tree | 2185e36d926d89dc17eea91a3c5e1001fd288b71 /ext/threads | |
parent | 974ec8aabf7e88f4525f977f303f53cf975a56ac (diff) | |
download | perl-a31a65c0bb15a314af697dcdcc79bc9e66e65a12.tar.gz |
Remove warnings from tests.
p4raw-id: //depot/perl@19706
Diffstat (limited to 'ext/threads')
-rwxr-xr-x | ext/threads/t/basic.t | 1 | ||||
-rw-r--r-- | ext/threads/t/end.t | 2 | ||||
-rw-r--r-- | ext/threads/t/join.t | 10 | ||||
-rw-r--r-- | ext/threads/t/list.t | 14 |
4 files changed, 14 insertions, 13 deletions
diff --git a/ext/threads/t/basic.t b/ext/threads/t/basic.t index c228d70e2f..09a148db9f 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 dd26042aed..19cd70433c 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 bcd813db69..3818e49358 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 193546f179..f8f82d2059 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,''); |