comparison run/scope_03.d @ 1615:8d5c55d163fd

Fix some outdated tests that used auto to mean scope.
author Christian Kamm <kamm incasoftware de>
date Sun, 12 Jul 2009 16:44:52 +0200
parents run/auto_03.d@ec5e144583ea
children
comparison
equal deleted inserted replaced
1614:709f6451b315 1615:8d5c55d163fd
1 // $HeadURL$
2 // $Date$
3 // $Author$
4
5 // @author@ Sean Kelly <sean@f4.ca>
6 // @date@ 2004-09-11
7 // @uri@ news:chtj6t$24bm$1@digitaldaemon.com
8 // @uri@ nntp://digitalmars.com/digitalmars.D.bugs/1821
9 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1035
10
11 module dstress.run.scope_03;
12
13 int status;
14
15 scope class ScopeClass{
16 ~this(){
17 if(0 != status){
18 assert(0);
19 }
20 status--;
21 throw new Exception("error msg");
22 }
23 }
24
25 void test(){
26 if(0 != status){
27 assert(0);
28 }
29 scope ScopeClass ac = new ScopeClass();
30 }
31
32 int main(){
33 try{
34 test();
35 }catch{
36 }
37
38 if(status==-1){
39 return 0;
40 }
41 assert(0);
42 }