Mercurial > projects > dstress
comparison run/auto_03.d @ 1559:ec5e144583ea
D1 -> D2 : 1/N
author | thomask |
---|---|
date | Sun, 19 Aug 2007 19:11:54 +0000 |
parents | be2b20dc0eb4 |
children |
comparison
equal
deleted
inserted
replaced
1558:d40d75fcd5c5 | 1559:ec5e144583ea |
---|---|
12 | 12 |
13 int status; | 13 int status; |
14 | 14 |
15 auto class AutoClass{ | 15 auto class AutoClass{ |
16 ~this(){ | 16 ~this(){ |
17 assert(status==0); | 17 if(0 != status){ |
18 assert(0); | |
19 } | |
18 status--; | 20 status--; |
19 throw new Exception("error msg"); | 21 throw new Exception("error msg"); |
20 } | 22 } |
21 } | 23 } |
22 | 24 |
23 void test(){ | 25 void test(){ |
24 assert(status==0); | 26 if(0 != status){ |
27 assert(0); | |
28 } | |
25 auto AutoClass ac = new AutoClass(); | 29 auto AutoClass ac = new AutoClass(); |
26 } | 30 } |
27 | 31 |
28 int main(){ | 32 int main(){ |
29 try{ | 33 try{ |