annotate run/sort_05.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 6e4063f99377
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
140
a33ad7189d21 1) news:// -> news:
thomask
parents: 67
diff changeset
1 // $HeadURL$
a33ad7189d21 1) news:// -> news:
thomask
parents: 67
diff changeset
2 // $Date$
a33ad7189d21 1) news:// -> news:
thomask
parents: 67
diff changeset
3 // $Author$
a33ad7189d21 1) news:// -> news:
thomask
parents: 67
diff changeset
4
49
1a7241967792 1) extended version test cases
thomask
parents:
diff changeset
5 // @author@ Russ Lewis <spamhole-2001-07-16@deming-os.org>
1a7241967792 1) extended version test cases
thomask
parents:
diff changeset
6 // @date@ 2004-10-11
140
a33ad7189d21 1) news:// -> news:
thomask
parents: 67
diff changeset
7 // @uri@ news:ckdc4r$re2$1@digitaldaemon.com
1487
6e4063f99377 changed nntp: URLs to http: URLs
thomask
parents: 1383
diff changeset
8 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=2068
67
ff32878c78da beautified test some cases
thomask
parents: 54
diff changeset
9
ff32878c78da beautified test some cases
thomask
parents: 54
diff changeset
10 module dstress.run.sort_05;
49
1a7241967792 1) extended version test cases
thomask
parents:
diff changeset
11
1a7241967792 1) extended version test cases
thomask
parents:
diff changeset
12 int main(){
297
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 140
diff changeset
13 double[] array;
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 140
diff changeset
14 array.length=10;
49
1a7241967792 1) extended version test cases
thomask
parents:
diff changeset
15 array[0]=double.max;
1a7241967792 1) extended version test cases
thomask
parents:
diff changeset
16 array[1]=0.875;
1a7241967792 1) extended version test cases
thomask
parents:
diff changeset
17 array[2]=0.75;
1a7241967792 1) extended version test cases
thomask
parents:
diff changeset
18 array[3]=0.625;
1a7241967792 1) extended version test cases
thomask
parents:
diff changeset
19 array[4]=0.5;
1a7241967792 1) extended version test cases
thomask
parents:
diff changeset
20 array[5]=0.375;
1a7241967792 1) extended version test cases
thomask
parents:
diff changeset
21 array[6]=0.25;
1a7241967792 1) extended version test cases
thomask
parents:
diff changeset
22 array[7]=0.125;
1a7241967792 1) extended version test cases
thomask
parents:
diff changeset
23 array[8]=0.0;
1a7241967792 1) extended version test cases
thomask
parents:
diff changeset
24 array[9]=double.min;
1a7241967792 1) extended version test cases
thomask
parents:
diff changeset
25
297
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 140
diff changeset
26 double[] sorted_copy = array.sort;
49
1a7241967792 1) extended version test cases
thomask
parents:
diff changeset
27
1a7241967792 1) extended version test cases
thomask
parents:
diff changeset
28 assert(sorted_copy.length==10);
297
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 140
diff changeset
29 assert(sorted_copy[0]==0.0);
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 140
diff changeset
30 assert(sorted_copy[1]==double.min);
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 140
diff changeset
31 assert(sorted_copy[2]==0.125);
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 140
diff changeset
32 assert(sorted_copy[3]==0.25);
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 140
diff changeset
33 assert(sorted_copy[4]==0.375);
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 140
diff changeset
34 assert(sorted_copy[5]==0.5);
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 140
diff changeset
35 assert(sorted_copy[6]==0.625);
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 140
diff changeset
36 assert(sorted_copy[7]==0.75);
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 140
diff changeset
37 assert(sorted_copy[8]==0.875);
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 140
diff changeset
38 assert(sorted_copy[9]==double.max);
49
1a7241967792 1) extended version test cases
thomask
parents:
diff changeset
39
297
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 140
diff changeset
40 assert(array.length==10);
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 140
diff changeset
41 assert(array[0]==0.0);
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 140
diff changeset
42 assert(array[1]==double.min);
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 140
diff changeset
43 assert(array[2]==0.125);
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 140
diff changeset
44 assert(array[3]==0.25);
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 140
diff changeset
45 assert(array[4]==0.375);
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 140
diff changeset
46 assert(array[5]==0.5);
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 140
diff changeset
47 assert(array[6]==0.625);
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 140
diff changeset
48 assert(array[7]==0.75);
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 140
diff changeset
49 assert(array[8]==0.875);
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 140
diff changeset
50 assert(array[9]==double.max);
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 140
diff changeset
51
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 140
diff changeset
52 assert(&array != &sorted_copy);
dc5c9509a605 sort ifloat/ireal/idouble
thomask
parents: 140
diff changeset
53
49
1a7241967792 1) extended version test cases
thomask
parents:
diff changeset
54 return 0;
1a7241967792 1) extended version test cases
thomask
parents:
diff changeset
55 }