start of new file
[IRC.git] / Robust / src / Tests / OptionalArgsTest / TestRuntime / TestRuntime2 / Willy.java
1
2
3 task Startup(StartupObject s {initialstate}){
4     
5     Test o = new Test() {A};
6     
7     taskexit(s {!initialstate});
8     
9 }
10
11 task ONE(Test o{A}){
12     o.decrease();
13     System.printString("Inside ONE\n");
14     int i = 100/o.getNumber();
15     taskexit(o {!A, B});
16     taskexit(o {!A, B});
17 }
18
19 task TWO(optional Test o{B}){
20  System.printString("Inside TWO\n");   
21  if(false) taskexit(o {!B, C});
22  else taskexit(o {!B, D});
23   
24 }
25
26 /*task THREE(Test o{B}){
27
28     taskexit(o {!B, D});
29     }*/
30
31 task FOUR(Test o{C}){
32 System.printString("Inside FOUR\n");
33     taskexit(o {!C, E});
34     
35     
36 }
37
38 task FIVE(optional Test o{D}){
39   System.printString("Inside FIVE\n");
40     taskexit(o {!D, F});
41
42 }
43
44 task SIX(Test o{E}){
45   System.printString("Inside SIX\n");
46     taskexit(o {!E, G, J});
47
48 }
49
50 task SEVEN(optional Test o{F}){
51   System.printString("Inside SEVEN\n");
52     taskexit(o {!F, G, K});
53
54 }
55
56 task EIGHT(optional Test o{G}){
57   System.printString("Inside EIGHT\n");
58     
59     if(false) taskexit(o {!G, H}); 
60     else taskexit(o {!G, I});
61
62 }
63
64 task NINE(optional Test o{H}){
65 System.printString("Inside NINE\n");
66 taskexit(o {!H}); 
67 }
68 task TEN(optional Test o{I}){
69 System.printString("Inside TEN\n");
70  if(true) taskexit(o {!I,L }); 
71  else taskexit(o {!I,M });
72 }