annotate run/dup_02.d @ 1619:bebc7472a832

Fix #7.
author Christian Kamm <kamm incasoftware de>
date Sat, 07 Nov 2009 18:55:30 +0100
parents 38ea1bb385b6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
374
f87ba6507260 added missing meta-data
thomask
parents: 4
diff changeset
1 // $HeadURL$
f87ba6507260 added missing meta-data
thomask
parents: 4
diff changeset
2 // $Date$
f87ba6507260 added missing meta-data
thomask
parents: 4
diff changeset
3 // $Author$
f87ba6507260 added missing meta-data
thomask
parents: 4
diff changeset
4
f87ba6507260 added missing meta-data
thomask
parents: 4
diff changeset
5 module dstress.run.dup_02;
f87ba6507260 added missing meta-data
thomask
parents: 4
diff changeset
6
4
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
7 int main(){
870
38ea1bb385b6 bit -> bool and __DSTRESS_TORTURE_BLOCK__ fixes
thomask
parents: 374
diff changeset
8 bool a[];
4
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
9 a.length=3;
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
10 a[0]=false;
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
11 a[1]=false;
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
12 a[2]=true;
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
13
870
38ea1bb385b6 bit -> bool and __DSTRESS_TORTURE_BLOCK__ fixes
thomask
parents: 374
diff changeset
14 bool[] b=a.dup;
4
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
15 a[1]=true;
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
16 b[0]=true;
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
17
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
18 assert(a.length==3);
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
19 assert(!a[0]);
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
20 assert(a[1]);
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
21 assert(a[2]);
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
22
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
23 assert(b.length==3);
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
24 assert(b[0]);
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
25 assert(!b[1]);
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
26 assert(b[2]);
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
27
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
28 return 0;
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
29 }