ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/t/03_cont.t
(Generate patch)

Comparing Coro/t/03_cont.t (file contents):
Revision 1.2 by root, Thu Jul 19 02:45:09 2001 UTC vs.
Revision 1.3 by root, Thu Jul 19 04:13:22 2001 UTC

1$|=1; 1$|=1;
2print "1..13\n"; 2print "1..18\n";
3 3
4use Coro; 4use Coro;
5use Coro::Cont; 5use Coro::Cont;
6 6
7$test = 1; 7$test = 1;
40 40
41$done = 0; 41$done = 0;
42 42
43yield while $done < 2; 43yield while $done < 2;
44 44
45sub cont : Cont {
46 result 2*shift;
47 result 3*shift;
48}
49
50print cont(3) == 6 ? "ok " : "not ok ", $test++, "\n";
51print cont(4) == 12 ? "ok " : "not ok ", $test++, "\n";
52print cont(5) == 10 ? "ok " : "not ok ", $test++, "\n";
53print cont(6) == 18 ? "ok " : "not ok ", $test++, "\n";
54print cont(7) == 14 ? "ok " : "not ok ", $test++, "\n";
55
56
57
58

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines