Mercurial > projects > dstress
comparison run/auto_03.d @ 0:3269e4627918
init dstress
author | svnowner |
---|---|
date | Sat, 25 Sep 2004 22:33:30 +0000 |
parents | |
children | 3414705c41ac |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:3269e4627918 |
---|---|
1 // $Header: /home/th/Dokumente/Entwicklung/MEIN_CVS/MiniD/src/run/auto_03.d,v 1.2 2004/09/23 11:32:26 th Exp $ | |
2 | |
3 // @author@ Sean Kelly <sean@f4.ca> | |
4 // @date@ 2004-09-11 | |
5 | |
6 int status; | |
7 | |
8 auto class AutoClass{ | |
9 ~this(){ | |
10 assert(status==0); | |
11 status--; | |
12 throw new Exception("error msg"); | |
13 } | |
14 } | |
15 | |
16 void test(){ | |
17 assert(status==0); | |
18 auto AutoClass ac = new AutoClass(); | |
19 } | |
20 | |
21 int main(){ | |
22 try{ | |
23 test(); | |
24 }catch{ | |
25 } | |
26 assert(status==-1); | |
27 return 0; | |
28 } |