Mercurial > projects > dstress
annotate run/switch_03.d @ 1630:d0efa3ae5522 default tip
run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author | David Nadlinger <code@klickverbot.at> |
---|---|
date | Sat, 23 Apr 2011 22:57:32 +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 } |