annotate run/sort_02.d @ 1630:d0efa3ae5522 default tip

run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author David Nadlinger <code@klickverbot.at>
date Sat, 23 Apr 2011 22:57:32 +0200
parents 32f7f8ce5e51
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
297
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 54
diff changeset
1 // $HeadURL$
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 54
diff changeset
2 // $Date$
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 54
diff changeset
3 // $Author$
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 54
diff changeset
4
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 54
diff changeset
5 module dstress.run.sort_02;
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 54
diff changeset
6
4
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
7 int main(){
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
8 byte a[];
54
94d73d5e528e extended and fixed sort tests
thomask
parents: 49
diff changeset
9 a.length=7;
49
1a7241967792 1) extended version test cases
thomask
parents: 4
diff changeset
10 a[0]=byte.max;
54
94d73d5e528e extended and fixed sort tests
thomask
parents: 49
diff changeset
11 a[1]=byte.max-1;
94d73d5e528e extended and fixed sort tests
thomask
parents: 49
diff changeset
12 a[2]=1;
94d73d5e528e extended and fixed sort tests
thomask
parents: 49
diff changeset
13 a[3]=0;
94d73d5e528e extended and fixed sort tests
thomask
parents: 49
diff changeset
14 a[4]=-1;
94d73d5e528e extended and fixed sort tests
thomask
parents: 49
diff changeset
15 a[5]=byte.min;
94d73d5e528e extended and fixed sort tests
thomask
parents: 49
diff changeset
16 a[6]=byte.min+1;
4
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
17
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
18 byte[] b=a.sort;
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
19
54
94d73d5e528e extended and fixed sort tests
thomask
parents: 49
diff changeset
20 assert(a.length==7);
49
1a7241967792 1) extended version test cases
thomask
parents: 4
diff changeset
21 assert(a[0]==byte.min);
54
94d73d5e528e extended and fixed sort tests
thomask
parents: 49
diff changeset
22 assert(a[1]==byte.min+1);
94d73d5e528e extended and fixed sort tests
thomask
parents: 49
diff changeset
23 assert(a[2]==-1);
94d73d5e528e extended and fixed sort tests
thomask
parents: 49
diff changeset
24 assert(a[3]==0);
94d73d5e528e extended and fixed sort tests
thomask
parents: 49
diff changeset
25 assert(a[4]==1);
94d73d5e528e extended and fixed sort tests
thomask
parents: 49
diff changeset
26 assert(a[5]==byte.max-1);
94d73d5e528e extended and fixed sort tests
thomask
parents: 49
diff changeset
27 assert(a[6]==byte.max);
4
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
28
54
94d73d5e528e extended and fixed sort tests
thomask
parents: 49
diff changeset
29 assert(b.length==7);
49
1a7241967792 1) extended version test cases
thomask
parents: 4
diff changeset
30 assert(b[0]==byte.min);
54
94d73d5e528e extended and fixed sort tests
thomask
parents: 49
diff changeset
31 assert(b[1]==byte.min+1);
94d73d5e528e extended and fixed sort tests
thomask
parents: 49
diff changeset
32 assert(b[2]==-1);
94d73d5e528e extended and fixed sort tests
thomask
parents: 49
diff changeset
33 assert(b[3]==0);
94d73d5e528e extended and fixed sort tests
thomask
parents: 49
diff changeset
34 assert(b[4]==1);
94d73d5e528e extended and fixed sort tests
thomask
parents: 49
diff changeset
35 assert(b[5]==byte.max-1);
94d73d5e528e extended and fixed sort tests
thomask
parents: 49
diff changeset
36 assert(b[6]==byte.max);
4
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
37
297
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 54
diff changeset
38 assert(&a != &b);
570
32f7f8ce5e51 updated "===" -> "is" and "!==" to "!(...===...)"
thomask
parents: 485
diff changeset
39 assert(a.ptr is b.ptr);
297
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 54
diff changeset
40
4
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
41 return 0;
1ed6616fe905 extended array tests
thomask
parents:
diff changeset
42 }