Mercurial > projects > dstress
view run/in_out_body_03.d @ 1607:1bbcc6407d4b
Update module statement for renamed tests.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Mon, 13 Apr 2009 13:48:46 +0200 |
parents | 6e4063f99377 |
children |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ Buchan <kbuchan@xtra.co.nz> // @date@ 2004-11-14 // @uri@ news:opshfzxz0b44buww@simon.homenet // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=2262 // __DSTRESS_TORTURE_BLOCK__ -release module dstress.run.in_out_body_03; bool in_checked; bool out_checked; class MyClass{ int i; } void outer(){ MyClass inner() in{ in_checked=true; }out (result){ assert(result.i==1); out_checked=true; }body{ MyClass s=new MyClass; s.i = 1; return s; } assert(inner.i==1); } int main(){ outer(); assert(in_checked); assert(out_checked); return 0; }