Mercurial > projects > dstress
view run/scope_03.d @ 1622:d402aa53926c
Add test for bug 3092 written by Manuel K?nig
author | Leandro Lucarella <llucax@gmail.com> |
---|---|
date | Tue, 19 Oct 2010 19:18:23 -0300 |
parents | 8d5c55d163fd |
children |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ Sean Kelly <sean@f4.ca> // @date@ 2004-09-11 // @uri@ news:chtj6t$24bm$1@digitaldaemon.com // @uri@ nntp://digitalmars.com/digitalmars.D.bugs/1821 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1035 module dstress.run.scope_03; int status; scope class ScopeClass{ ~this(){ if(0 != status){ assert(0); } status--; throw new Exception("error msg"); } } void test(){ if(0 != status){ assert(0); } scope ScopeClass ac = new ScopeClass(); } int main(){ try{ test(); }catch{ } if(status==-1){ return 0; } assert(0); }