annotate run/o/opSlice_02_B.d @ 1489:b8c0195059d9

changed nntp: URLs to http: URLs
author thomask
date Mon, 09 Apr 2007 13:47:01 +0000
parents 56e9b89c4b72
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
781
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
1 // $HeadURL$
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
2 // $Date$
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
3 // $Author$
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
4
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
5 // @author@ Stewart Gordon <smjg_1998@yahoo.com>
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
6 // @date@ 2005-12-12
1489
b8c0195059d9 changed nntp: URLs to http: URLs
thomask
parents: 781
diff changeset
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=5835
781
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
8
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
9 module dstress.run.o.opSlice_02_B;
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
10
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
11 int main() {
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
12 int[] piece = new int[6];
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
13 int[] item;
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
14
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
15 item = (piece[2..5] = 13);
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
16
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
17 assert (item.ptr is piece[2..5].ptr);
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
18
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
19 piece[3] = 25;
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
20
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
21 assert (piece[0] == 0);
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
22 assert (piece[1] == 0);
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
23 assert (piece[2] == 13);
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
24 assert (piece[3] == 25);
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
25 assert (piece[4] == 13);
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
26 assert (piece[5] == 0);
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
27
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
28 assert (item.length == 3);
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
29 assert (item[0] == 13);
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
30 assert (item[1] == 25);
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
31 assert (item[2] == 13);
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
32
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
33 return 0;
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
34 }