ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/EV/t/02_once.t
(Generate patch)

Comparing EV/t/02_once.t (file contents):
Revision 1.1 by root, Fri Nov 23 12:22:26 2007 UTC vs.
Revision 1.2 by root, Fri Nov 23 13:08:57 2007 UTC

1BEGIN { $| = 1; print "1..8\n"; } 1BEGIN { $| = 1; print "1..6\n"; }
2 2
3no warnings; 3no warnings;
4use strict; 4use strict;
5 5
6use EV; 6use EV;
7 7
8for my $i (2..5) { 8for my $i (3..5) {
9 EV::once undef, 0, $i * 0.05, sub { 9 EV::once undef, 0, $i * 0.05, sub {
10 print $_[0] == EV::TIMEOUT ? "" : "not ", "ok $i\n"; 10 print $_[0] == EV::TIMEOUT ? "" : "not ", "ok $i\n";
11 }; 11 };
12} 12}
13 13
14EV::once 1, EV::WRITE, 0.5, sub {
15 print $_[0] == EV::WRITE ? "" : "not ", "ok 2\n";
16};
17
14print "ok 1\n"; 18print "ok 1\n";
15EV::loop; 19EV::loop;
16print "ok 6\n"; 20print "ok 6\n";
17
18EV::once 1, EV::WRITE, 0.5, sub {
19 print $_[0] == EV::WRITE ? "" : "not ", "ok 7\n";
20};
21
22EV::loop;
23print "ok 8\n";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines