Mercurial > projects > dstress
comparison run/scope_07.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_07.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@ 2005-04-14 | |
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=3645 | |
8 | |
9 module dstress.run.scope_07; | |
10 | |
11 int status; | |
12 | |
13 scope class Parent{ | |
14 } | |
15 | |
16 scope class Child : Parent{ | |
17 this(){ | |
18 if(0 != status){ | |
19 assert(0); | |
20 } | |
21 status=1; | |
22 } | |
23 | |
24 ~this(){ | |
25 if(1 != status){ | |
26 assert(0); | |
27 } | |
28 status=2; | |
29 } | |
30 } | |
31 | |
32 void test(){ | |
33 scope Parent o = new Child(); | |
34 if(1 != status){ | |
35 assert(0); | |
36 } | |
37 } | |
38 | |
39 int main(){ | |
40 test(); | |
41 | |
42 if(status==2){ | |
43 return 0; | |
44 } | |
45 | |
46 assert(0); | |
47 } | |
48 |