annotate run/break_08.d @ 1559:ec5e144583ea

D1 -> D2 : 1/N
author thomask
date Sun, 19 Aug 2007 19:11:54 +0000
parents 85ed61918ae4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
203
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
1 // $HeadURL$
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
2 // $Date$
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
3 // $Author$
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
4
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
5 module dstress.run.break_08;
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
6
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
7 int status;
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
8
1559
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 203
diff changeset
9 int test(string[] args){
203
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
10 loop: while(1){
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
11 try{
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
12 try{
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
13 if(args.length==1){
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
14 break loop;
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
15 }
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
16 }finally{
1559
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 203
diff changeset
17 if(0 != status){
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 203
diff changeset
18 assert(0);
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 203
diff changeset
19 }
203
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
20 status+=2;
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
21 }
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
22
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
23 try{
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
24 assert(0);
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
25 }finally{
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
26 assert(0);
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
27 }
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
28 }finally{
1559
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 203
diff changeset
29 if(2 != status){
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 203
diff changeset
30 assert(0);
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 203
diff changeset
31 }
203
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
32 status+=3;
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
33 }
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
34 assert(0);
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
35 return 0;
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
36 }
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
37 return -1;
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
38 }
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
39
1559
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 203
diff changeset
40 int main(string[] args){
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 203
diff changeset
41 if(0 != status ){
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 203
diff changeset
42 assert(0);
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 203
diff changeset
43 }
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 203
diff changeset
44 if(1 != args.length ){
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 203
diff changeset
45 assert(0);
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 203
diff changeset
46 }
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 203
diff changeset
47 if(-1 != test(args) ){
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 203
diff changeset
48 assert(0);
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 203
diff changeset
49 }
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 203
diff changeset
50 if(5 != status ){
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 203
diff changeset
51 assert(0);
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 203
diff changeset
52 }
203
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
53 return 0;
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
54 }