Mercurial > projects > dstress
annotate run/t/typedef_13_G.d @ 1319:81222734adf3
sed'ed replacement of new:...http.d.puremagic.co... with http://d.puremagic.com/issues/show_bug.cgi?...
author | thomask |
---|---|
date | Sun, 31 Dec 2006 19:58:06 +0000 |
parents | bc3c8ee485f5 |
children |
rev | line source |
---|---|
906 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ <jarrett.billingsley@gmail.com> | |
6 // @date@ 2006-03-11 | |
1319
81222734adf3
sed'ed replacement of new:...http.d.puremagic.co... with http://d.puremagic.com/issues/show_bug.cgi?...
thomask
parents:
906
diff
changeset
|
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=36 |
906 | 8 |
9 module dstress.run.t.typedef_13_G; | |
10 | |
11 bool status = false; | |
12 | |
13 enum Enum { | |
14 ONE = 1, | |
15 TWO, | |
16 THREE | |
17 } | |
18 | |
19 class A { | |
20 typedef void function(Enum) EnumDG; | |
21 | |
22 void fork(EnumDG dg){ | |
23 dg(Enum.TWO); | |
24 } | |
25 | |
26 } | |
27 | |
28 void test(Enum e){ | |
29 if(e != Enum.TWO){ | |
30 assert(0); | |
31 } | |
32 status = true; | |
33 } | |
34 | |
35 int main(){ | |
36 if(status){ | |
37 assert(0); | |
38 } | |
39 | |
40 A a = new A(); | |
41 a.fork(&test); | |
42 | |
43 if(!status){ | |
44 assert(0); | |
45 } | |
46 | |
47 return 0; | |
48 } | |
49 |