Mercurial > projects > dstress
annotate run/sort_01.d @ 297:dc5c9509a605
sort ifloat/ireal/idouble
zwang <nehzgnaw@gmail.com>
2005-02-19
news:cv7gn5$2irj$1@digitaldaemon.com
nntp://digitalmars.com/digitalmars.D.bugs/3022
author | thomask |
---|---|
date | Sat, 19 Feb 2005 15:35:05 +0000 |
parents | 5f98d4a33d49 |
children | 1197cba57329 |
rev | line source |
---|---|
297 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
70
5f98d4a33d49
1) review of all test cases with unexpected results (except encoding and html/xml)
thomask
parents:
4
diff
changeset
|
5 // sort is documented as a general array property |
5f98d4a33d49
1) review of all test cases with unexpected results (except encoding and html/xml)
thomask
parents:
4
diff
changeset
|
6 module dstress.run.sort_01; |
5f98d4a33d49
1) review of all test cases with unexpected results (except encoding and html/xml)
thomask
parents:
4
diff
changeset
|
7 |
4 | 8 int main(){ |
9 bit a[]; | |
10 a.length=3; | |
11 a[0]=false; | |
12 a[1]=true; | |
13 a[2]=false; | |
14 | |
15 bit[] b=a.sort; | |
16 | |
17 assert(a.length==3); | |
18 assert(!a[0]); | |
19 assert(!a[1]); | |
20 assert(a[2]); | |
21 | |
22 assert(b.length==3); | |
23 assert(!b[0]); | |
24 assert(!b[1]); | |
25 assert(b[2]); | |
297 | 26 |
27 assert(&a != &b); | |
4 | 28 |
29 return 0; | |
30 } |