Mercurial > projects > dstress
annotate run/switch_03.d @ 1597:8b9d4d2f925a
Fix typos in complex tests. See D bug 614.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Tue, 09 Sep 2008 16:53:58 +0200 |
parents | 9a121126b077 |
children |
rev | line source |
---|---|
374 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
70
5f98d4a33d49
1) review of all test cases with unexpected results (except encoding and html/xml)
thomask
parents:
1
diff
changeset
|
5 // SwitchError should be a sub-class of Error witch in turn is a sub-class of Exception |
5f98d4a33d49
1) review of all test cases with unexpected results (except encoding and html/xml)
thomask
parents:
1
diff
changeset
|
6 |
756 | 7 // __DSTRESS_TORTURE_BLOCK__ -release |
8 | |
70
5f98d4a33d49
1) review of all test cases with unexpected results (except encoding and html/xml)
thomask
parents:
1
diff
changeset
|
9 module dstress.run.switch_03; |
0 | 10 |
11 int main(){ | |
12 int test=10; | |
13 | |
14 assert(test==10); | |
15 try{ | |
16 switch(test){ | |
17 case 11: break; | |
18 case 12: break; | |
19 } | |
20 }catch(Exception e){ | |
21 test=1; | |
70
5f98d4a33d49
1) review of all test cases with unexpected results (except encoding and html/xml)
thomask
parents:
1
diff
changeset
|
22 }catch{ |
5f98d4a33d49
1) review of all test cases with unexpected results (except encoding and html/xml)
thomask
parents:
1
diff
changeset
|
23 test=0; |
0 | 24 } |
25 | |
26 assert(test==1); | |
27 | |
28 return 0; | |
29 } |