Mercurial > projects > dstress
annotate run/auto_06.d @ 1559:ec5e144583ea
D1 -> D2 : 1/N
author | thomask |
---|---|
date | Sun, 19 Aug 2007 19:11:54 +0000 |
parents | c67acdbaf88e |
children |
rev | line source |
---|---|
395 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 module dstress.run.auto_06; | |
6 | |
7 int status; | |
8 | |
9 auto class A{ | |
10 int cond; | |
11 | |
12 this(int cond){ | |
13 this.cond=cond; | |
14 } | |
15 | |
16 ~this(){ | |
1559 | 17 if(cond != status){ |
18 assert(0); | |
19 } | |
395 | 20 status--; |
21 } | |
22 } | |
23 | |
24 void test(){ | |
25 auto A a = new A(-1); | |
26 auto A b = new A(0); | |
27 } | |
28 | |
29 int main(){ | |
30 test(); | |
799 | 31 |
32 if(status==-2){ | |
33 return 0; | |
34 } | |
395 | 35 } |