dougm 2002/06/23 14:29:18
Modified:t/apr.cvsignore
Added: t/response/TestAPR threadmutex.pm
Log:
add tests for APR::ThreadMutex
Revision ChangesPath
1.6 +1 -0 modperl-2.0/t/apr/.cvsignore
Index: .cvsignore
===
RCS file: /home/cvs/modperl-2.0/t/apr/.cvsignore,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- .cvsignore22 May 2002 16:30:40 - 1.5
+++ .cvsignore23 Jun 2002 21:29:18 - 1.6
-10,3 +10,4
util.t
uuid.t
os.t
+threadmutex.t
1.1 modperl-2.0/t/response/TestAPR/threadmutex.pm
Index: threadmutex.pm
===
package TestAPR::threadmutex;
use strict;
use warnings FATAL = 'all';
use Apache::Test;
use Apache::TestUtil;
use Apache::Const -compile = 'OK';
use APR::Const -compile = qw(EBUSY SUCCESS);
sub handler {
my $r = shift;
plan $r, tests = 4, 'APR::ThreadMutex';
require APR::ThreadMutex;
my $mutex = APR::ThreadMutex-new($r-pool);
ok $mutex;
ok t_cmp($mutex-lock, APR::SUCCESS,
'lock == APR::SUCCESS');
ok t_cmp($mutex-trylock, APR::EBUSY,
'trylock == APR::EBUSY');
ok t_cmp($mutex-unlock, APR::SUCCESS,
'unlock == APR::SUCCESS');
Apache::OK;
}
1;