This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove warnings from tests.
authorArtur Bergman <sky@nanisky.com>
Sat, 7 Jun 2003 13:07:53 +0000 (13:07 +0000)
committerArtur Bergman <sky@nanisky.com>
Sat, 7 Jun 2003 13:07:53 +0000 (13:07 +0000)
p4raw-id: //depot/perl@19706

ext/threads/t/basic.t
ext/threads/t/end.t
ext/threads/t/join.t
ext/threads/t/list.t

index c228d70..09a148d 100755 (executable)
@@ -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();
 }
index dd26042..19cd704 100644 (file)
@@ -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();
index bcd813d..3818e49 100644 (file)
@@ -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;
index 193546f..f8f82d2 100644 (file)
@@ -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,'');