Mercurial > projects > dstress
annotate run/auto_03.d @ 1559:ec5e144583ea
D1 -> D2 : 1/N
author | thomask |
---|---|
date | Sun, 19 Aug 2007 19:11:54 +0000 |
parents | be2b20dc0eb4 |
children |
rev | line source |
---|---|
140 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
0 | 5 // @author@ Sean Kelly <sean@f4.ca> |
6 // @date@ 2004-09-11 | |
140 | 7 // @uri@ news:chtj6t$24bm$1@digitaldaemon.com |
1383 | 8 // @uri@ nntp://digitalmars.com/digitalmars.D.bugs/1821 |
1410 | 9 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1035 |
70
5f98d4a33d49
1) review of all test cases with unexpected results (except encoding and html/xml)
thomask
parents:
1
diff
changeset
|
10 |
5f98d4a33d49
1) review of all test cases with unexpected results (except encoding and html/xml)
thomask
parents:
1
diff
changeset
|
11 module dstress.run.auto_03; |
0 | 12 |
13 int status; | |
14 | |
15 auto class AutoClass{ | |
16 ~this(){ | |
1559 | 17 if(0 != status){ |
18 assert(0); | |
19 } | |
0 | 20 status--; |
21 throw new Exception("error msg"); | |
22 } | |
23 } | |
24 | |
25 void test(){ | |
1559 | 26 if(0 != status){ |
27 assert(0); | |
28 } | |
0 | 29 auto AutoClass ac = new AutoClass(); |
30 } | |
31 | |
32 int main(){ | |
33 try{ | |
34 test(); | |
35 }catch{ | |
36 } | |
799 | 37 |
38 if(status==-1){ | |
39 return 0; | |
40 } | |
41 assert(0); | |
0 | 42 } |