ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/Coro/t/00_basic.t
Revision: 1.4
Committed: Sat Aug 11 19:59:20 2001 UTC (22 years, 11 months ago) by root
Content type: application/x-troff
Branch: MAIN
CVS Tags: rel-2_5, rel-2_0, rel-2_1, rel-1_1, rel-1_0, rel-1_9, rel-1_2, rel-1_5, rel-1_4, rel-1_7, rel-1_6, rel-1_31, stack_sharing
Changes since 1.3: +4 -4 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 BEGIN { $| = 1; print "1..6\n"; }
2     END {print "not ok 1\n" unless $loaded;}
3 root 1.3 use Coro::State;
4 root 1.1 $loaded = 1;
5     print "ok 1\n";
6    
7 root 1.3 my $main = new Coro::State;
8     my $proc = new Coro::State \&a;
9 root 1.1
10     sub a {
11     print "ok 3\n";
12 root 1.4 $proc->transfer($main, 0);
13 root 1.1 print "ok 5\n";
14 root 1.4 $proc->transfer($main, 0);
15 root 1.2 die;
16 root 1.1 }
17    
18     print "ok 2\n";
19 root 1.4 $main->transfer($proc, 0);
20 root 1.1 print "ok 4\n";
21 root 1.4 $main->transfer($proc, 0);
22 root 1.1 print "ok 6\n";
23