ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/t/66_ioasync_04_condvar.t
(Generate patch)

Comparing AnyEvent/t/66_ioasync_04_condvar.t (file contents):
Revision 1.1 by root, Thu Jun 25 11:16:08 2009 UTC vs.
Revision 1.9 by root, Fri Aug 12 18:41:29 2011 UTC

1$|=1; 1use AnyEvent;
2BEGIN {
3 print "1..21\n"
4}
5 2
6use AnyEvent; 3 BEGIN { $ENV{PERL_ANYEVENT_LOOP_TESTS} or ((print qq{1..0 # SKIP PERL_ANYEVENT_LOOP_TESTS not true\n}), exit 0) }
7use AnyEvent::Impl::IOAsync; 4 BEGIN { eval q{use AnyEvent::Impl::IOAsync;1} or ((print qq{1..0 # SKIP AnyEvent::Impl::IOAsync not loadable\n}), exit 0) }
8use IO::Async::Loop; AnyEvent::Impl::IOAsync::set_loop new IO::Async::Loop; 5
6
7
8$| = 1; print "1..21\n";
9 9
10print "ok 1\n"; 10print "ok 1\n";
11 11
12{ 12{
13 my $cv = AnyEvent->condvar; 13 my $cv = AnyEvent->condvar;
29 print "ok 3\n"; 29 print "ok 3\n";
30 $cv->send (7, 5); 30 $cv->send (7, 5);
31 }); 31 });
32 32
33 print "ok 2\n"; 33 print "ok 2\n";
34 $cv->wait; 34 $cv->recv;
35 print "ok 8\n"; 35 print "ok 8\n";
36 36
37 my @x = $cv->recv; 37 my @x = $cv->recv;
38 print $x[1] == 5 ? "" : "not ", "ok 9 # $x[1] == 5\n"; 38 print $x[1] == 5 ? "" : "not ", "ok 9 # $x[1] == 5\n";
39} 39}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines