diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2002-05-19 01:50:43 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-05-19 00:29:36 +0000 |
commit | 7b13eb731a6f240c77f8d04c86f0a14142680f98 (patch) | |
tree | aaf772d3c6aeb83def1d1bd6a48477013030234a /ext/threads | |
parent | 9965345dfe11415fe4409828505acf6c7fe193b9 (diff) | |
download | perl-7b13eb731a6f240c77f8d04c86f0a14142680f98.tar.gz |
Re: [PATCH threads] revised warnings + more tests + docs
Message-ID: <20020519005043.F7275@fdgroup.com>
p4raw-id: //depot/perl@16689
Diffstat (limited to 'ext/threads')
-rw-r--r-- | ext/threads/shared/t/cond.t | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/ext/threads/shared/t/cond.t b/ext/threads/shared/t/cond.t index 96016054b6..8c793471c3 100644 --- a/ext/threads/shared/t/cond.t +++ b/ext/threads/shared/t/cond.t @@ -10,7 +10,7 @@ BEGIN { } } $|++; -print "1..25\n"; +print "1..29\n"; use strict; @@ -247,3 +247,26 @@ sub ok { } +# test warnings; + +{ + my $warncount = 0; + local $SIG{__WARN__} = sub { $warncount++ }; + + my $lock : shared; + + cond_signal($lock); + ok(1, $warncount == 1, 'get warning on cond_signal'); + cond_broadcast($lock); + ok(2, $warncount == 2, 'get warning on cond_broadcast'); + no warnings 'threads'; + cond_signal($lock); + ok(3, $warncount == 2, 'get no warning on cond_signal'); + cond_broadcast($lock); + ok(4, $warncount == 2, 'get no warning on cond_broadcast'); + + $Base += 4; +} + + + |