annotate run/const_16.d @ 1597:8b9d4d2f925a

Fix typos in complex tests. See D bug 614.
author Christian Kamm <kamm incasoftware de>
date Tue, 09 Sep 2008 16:53:58 +0200
parents b8c0195059d9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
347
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
1 // $HeadURL$
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
2 // $Date$
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
3 // $Author$
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
4
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
5 // @author@ Stewart Gordon <smjg_1998@yahoo.com>
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
6 // @date@ 2005-03-21
1489
b8c0195059d9 changed nntp: URLs to http: URLs
thomask
parents: 435
diff changeset
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=3290
347
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
8
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
9 module dstress.run.const_16;
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
10
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
11 struct StructA{
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
12 int a;
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
13 }
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
14
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
15 const int i = 15;
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
16
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
17 const StructA s1 = { i+1 };
435
ec6d35cccfb5 pre dmd-0.121 review
thomask
parents: 347
diff changeset
18 const StructA s2 = s1;
347
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
19
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
20 int main(){
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
21 assert(s1.a == 16);
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
22 assert(s2.a == 16);
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
23 return 0;
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
24 }