annotate run/align_08.d @ 363:56eae111e8ef

struct alignment / gc Ben Hinkle <bhinkle@mathworks.com> 2005-03-23 news:d1s5gs$2odc$1@digitaldaemon.com
author thomask
date Fri, 25 Mar 2005 07:33:35 +0000
parents
children b8c0195059d9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
363
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
1 // $HeadURL$
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
2 // $Date$
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
3 // $Author$
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
4
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
5 // @author@ Ben Hinkle <bhinkle@mathworks.com>
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
6 // @date@ 2005-03-23
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
7 // @uri@ news:d1s5gs$2odc$1@digitaldaemon.com
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
8
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
9 // @WARNING@ imports Phobos' gc
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
10
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
11 module dstress.run.align_08;
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
12
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
13 import std.gc;
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
14
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
15 struct S{
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
16 char[] font_face;
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
17 }
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
18
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
19 int main(){
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
20 S[] x;
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
21
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
22 for (int i=0;i<3;i++) {
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
23 S s;
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
24 s.font_face="font face".dup;
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
25 x ~= s;
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
26 }
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
27
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
28 fullCollect();
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
29
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
30 assert(x[0].font_face=="font face");
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
31 assert(x[1].font_face=="font face");
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
32
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
33 return 0;
56eae111e8ef struct alignment / gc
thomask
parents:
diff changeset
34 }