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

Comparing AnyEvent/t/62_cocoa_04_condvar.t (file contents):
Revision 1.4 by root, Fri Aug 12 18:41:27 2011 UTC vs.
Revision 1.5 by root, Thu Aug 18 17:58:53 2011 UTC

3 BEGIN { $ENV{PERL_ANYEVENT_LOOP_TESTS} or ((print qq{1..0 # SKIP PERL_ANYEVENT_LOOP_TESTS not true\n}), exit 0) } 3 BEGIN { $ENV{PERL_ANYEVENT_LOOP_TESTS} or ((print qq{1..0 # SKIP PERL_ANYEVENT_LOOP_TESTS not true\n}), exit 0) }
4 BEGIN { eval q{use AnyEvent::Impl::Cocoa;1} or ((print qq{1..0 # SKIP AnyEvent::Impl::Cocoa not loadable\n}), exit 0) } 4 BEGIN { eval q{use AnyEvent::Impl::Cocoa;1} or ((print qq{1..0 # SKIP AnyEvent::Impl::Cocoa not loadable\n}), exit 0) }
5 5
6 6
7 7
8$| = 1; print "1..21\n"; 8$| = 1; print "1..28\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;
72 print "ok 20\n"; 72 print "ok 20\n";
73 $cv->recv; 73 $cv->recv;
74 print "ok 21\n"; 74 print "ok 21\n";
75} 75}
76 76
77{
78 my $cv = AE::cv {
79 print +($_[0]->recv)[0] == 6 ? "" : "not ", "ok 27\n";
80 };
81
82 print "ok 22\n";
83
84 $cv->begin (sub {
85 print "ok 26\n";
86 $_[0](6);
87 });
88
89 print "ok 23\n";
90 $cv->begin;
91 print "ok 24\n";
92 $cv->end;
93 print "ok 25\n";
94 $cv->end;
95
96 print "ok 28\n";
97}
98

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines