297
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
|
5 module dstress.run.sort_02;
|
|
6
|
4
|
7 int main(){
|
|
8 byte a[];
|
54
|
9 a.length=7;
|
49
|
10 a[0]=byte.max;
|
54
|
11 a[1]=byte.max-1;
|
|
12 a[2]=1;
|
|
13 a[3]=0;
|
|
14 a[4]=-1;
|
|
15 a[5]=byte.min;
|
|
16 a[6]=byte.min+1;
|
4
|
17
|
|
18 byte[] b=a.sort;
|
|
19
|
54
|
20 assert(a.length==7);
|
49
|
21 assert(a[0]==byte.min);
|
54
|
22 assert(a[1]==byte.min+1);
|
|
23 assert(a[2]==-1);
|
|
24 assert(a[3]==0);
|
|
25 assert(a[4]==1);
|
|
26 assert(a[5]==byte.max-1);
|
|
27 assert(a[6]==byte.max);
|
4
|
28
|
54
|
29 assert(b.length==7);
|
49
|
30 assert(b[0]==byte.min);
|
54
|
31 assert(b[1]==byte.min+1);
|
|
32 assert(b[2]==-1);
|
|
33 assert(b[3]==0);
|
|
34 assert(b[4]==1);
|
|
35 assert(b[5]==byte.max-1);
|
|
36 assert(b[6]==byte.max);
|
4
|
37
|
297
|
38 assert(&a != &b);
|
570
|
39 assert(a.ptr is b.ptr);
|
297
|
40
|
4
|
41 return 0;
|
|
42 }
|