annotate run/opCatAssign_04.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 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.opCatAssign_04;
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]=true;
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
11 a[1]=true;
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
12 a[2]=true;
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
13 assert(a.length==3);
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
14
870
38ea1bb385b6 bit -> bool and __DSTRESS_TORTURE_BLOCK__ fixes
thomask
parents: 374
diff changeset
15 bool[] b;
4
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
16 b.length=2;
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
17 b[0]=false;
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
18 b[1]=false;
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
19 assert(b.length==2);
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
20
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
21 a~=b;
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
22 assert(a.length==5);
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
23 assert(a[0]);
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
24 assert(a[1]);
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
25 assert(a[2]);
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
26 assert(!a[3]);
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
27 assert(!a[4]);
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
28
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
29 return 0;
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
30 }