Mercurial > projects > dstress
annotate run/auto_02.d @ 374:f87ba6507260
added missing meta-data
author | thomask |
---|---|
date | Thu, 31 Mar 2005 09:01:33 +0000 |
parents | 3414705c41ac |
children | c67acdbaf88e |
rev | line source |
---|---|
374 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
0 | 4 |
5 // @author@ Sean Kelly <sean@f4.ca> | |
6 // @date@ 2004-09-11 | |
7 | |
374 | 8 module dstress.run.auto_02; |
9 | |
0 | 10 int status; |
11 | |
12 auto class AutoClass{ | |
13 void bad(){ | |
14 throw new Exception("error msg"); | |
15 } | |
16 ~this(){ | |
17 assert(status==0); | |
18 status--; | |
19 } | |
20 } | |
21 | |
22 void test(){ | |
23 try{ | |
24 auto AutoClass ac = new AutoClass(); | |
25 ac.bad(); | |
26 }catch{ | |
27 } | |
28 } | |
29 | |
30 int main(){ | |
31 assert(status==0); | |
32 test(); | |
33 assert(status==-1); | |
34 return 0; | |
35 } |