Mercurial > projects > dstress
annotate run/invariant_01.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 | ec5e144583ea |
children |
rev | line source |
---|---|
374 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
736 | 5 // __DSTRESS_TORTURE_BLOCK__ -release |
6 | |
59 | 7 module dstress.run.invariant_01; |
8 | |
9 class MyClass{ | |
10 int test; | |
11 | |
12 this(){} | |
13 | |
1559 | 14 invariant(){ |
15 if(test != 0){ | |
16 assert(0); | |
17 } | |
59 | 18 } |
19 } | |
20 | |
21 int main(){ | |
22 int success; | |
23 try{ | |
24 MyClass c = new MyClass(); | |
25 }catch{ | |
26 success++; | |
27 } | |
1559 | 28 if(success != 1){ |
29 assert(0); | |
30 } | |
59 | 31 return 0; |
32 } |