Mercurial > projects > dstress
annotate run/d/delete_12_A.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 | b8c0195059d9 |
children |
rev | line source |
---|---|
834 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ Nick <Nick_member@pathlink.com> | |
6 // @date@ 2006-02-15 | |
1489 | 7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=6267 |
834 | 8 |
9 module dstress.run.d.delete_12_A; | |
10 | |
11 int status; | |
12 | |
13 class Foo{ | |
14 new(size_t sz){ | |
15 void* p; | |
16 | |
889 | 17 p = (new byte[sz]).ptr; |
1091 | 18 |
834 | 19 if(status++ != 1){ |
20 assert(0); | |
21 } | |
22 | |
23 return p; | |
24 } | |
25 | |
26 delete(void* p){ | |
27 if(status++ != 2){ | |
28 assert(0); | |
29 } | |
30 } | |
31 } | |
32 | |
33 void test(){ | |
1615
8d5c55d163fd
Fix some outdated tests that used auto to mean scope.
Christian Kamm <kamm incasoftware de>
parents:
1489
diff
changeset
|
34 scope Foo f = new Foo(); |
834 | 35 } |
36 | |
37 int main(){ | |
38 if(status++ != 0){ | |
39 assert(0); | |
40 } | |
41 | |
42 test(); | |
43 | |
44 if(status++ != 3){ | |
45 assert(0); | |
46 } | |
47 | |
48 return 0; | |
49 } |