Mercurial > projects > dstress
diff run/break_09.d @ 1559:ec5e144583ea
D1 -> D2 : 1/N
author | thomask |
---|---|
date | Sun, 19 Aug 2007 19:11:54 +0000 |
parents | 85ed61918ae4 |
children |
line wrap: on
line diff
--- a/run/break_09.d Mon Jul 23 18:47:01 2007 +0000 +++ b/run/break_09.d Sun Aug 19 19:11:54 2007 +0000 @@ -6,7 +6,7 @@ int status; -int test(char[][] args){ +int test(string[] args){ loop: while(1){ try{ @@ -15,11 +15,15 @@ break loop; } }finally{ - assert(status==0); + if(0 != status){ + assert(0); + } status+=2; } }finally{ - assert(status==2); + if(2 != status){ + assert(0); + } status+=3; } return 0; @@ -27,10 +31,18 @@ return -1; } -int main(char[][] args){ - assert(status == 0); - assert(args.length == 1); - assert(test(args) == -1); - assert(status == 5); +int main(string[] args){ + if(0 != status ){ + assert(0); + } + if(1 != args.length ){ + assert(0); + } + if(-1 != test(args) ){ + assert(0); + } + if(5 != status ){ + assert(0); + } return 0; }