annotate run/goto_03.d @ 1619:bebc7472a832

Fix #7.
author Christian Kamm <kamm incasoftware de>
date Sat, 07 Nov 2009 18:55:30 +0100
parents 2f17af7c6359
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
184
2f17af7c6359 extended goto tests
thomask
parents:
diff changeset
1 // $HeadURL$
2f17af7c6359 extended goto tests
thomask
parents:
diff changeset
2 // $Date$
2f17af7c6359 extended goto tests
thomask
parents:
diff changeset
3 // $Author$
2f17af7c6359 extended goto tests
thomask
parents:
diff changeset
4
2f17af7c6359 extended goto tests
thomask
parents:
diff changeset
5 module dstress.run.goto_03;
2f17af7c6359 extended goto tests
thomask
parents:
diff changeset
6
2f17af7c6359 extended goto tests
thomask
parents:
diff changeset
7 int main(){
2f17af7c6359 extended goto tests
thomask
parents:
diff changeset
8 int i=1;
2f17af7c6359 extended goto tests
thomask
parents:
diff changeset
9 switch(i){
2f17af7c6359 extended goto tests
thomask
parents:
diff changeset
10 case 0:
2f17af7c6359 extended goto tests
thomask
parents:
diff changeset
11 if(i==9){
2f17af7c6359 extended goto tests
thomask
parents:
diff changeset
12 return 0;
2f17af7c6359 extended goto tests
thomask
parents:
diff changeset
13 }
2f17af7c6359 extended goto tests
thomask
parents:
diff changeset
14 assert(0);
2f17af7c6359 extended goto tests
thomask
parents:
diff changeset
15 case 1:
2f17af7c6359 extended goto tests
thomask
parents:
diff changeset
16 i=9;
2f17af7c6359 extended goto tests
thomask
parents:
diff changeset
17 goto case 0;
2f17af7c6359 extended goto tests
thomask
parents:
diff changeset
18 assert(0);
2f17af7c6359 extended goto tests
thomask
parents:
diff changeset
19 case 2:
2f17af7c6359 extended goto tests
thomask
parents:
diff changeset
20 assert(0);
2f17af7c6359 extended goto tests
thomask
parents:
diff changeset
21 default:
2f17af7c6359 extended goto tests
thomask
parents:
diff changeset
22 assert(0);
2f17af7c6359 extended goto tests
thomask
parents:
diff changeset
23 }
2f17af7c6359 extended goto tests
thomask
parents:
diff changeset
24 }