Mercurial > projects > dstress
annotate run/invariant_02.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 | 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_02; |
374 | 8 |
59 | 9 int status; |
10 | |
11 class MyClass{ | |
12 int test; | |
13 | |
14 this(){ | |
15 test=2; | |
16 } | |
17 | |
1559 | 18 invariant(){ |
19 if(2 != test){ | |
20 assert(0); | |
21 } | |
59 | 22 status++; |
23 } | |
24 } | |
25 | |
26 int main(){ | |
27 assert(status==0); | |
28 MyClass c = new MyClass(); | |
1559 | 29 if(1 != status){ |
30 assert(0); | |
31 } | |
59 | 32 return 0; |
33 } |