Mercurial > projects > dstress
annotate run/sort_01.d @ 485:1197cba57329
9Li / 9Fi
Thomas Kuehne <thomas-dloop@kuehne.thisisspam.cn>
2005-04-26
news:pln1k2-5f3.ln1@lnews.kuehne.cn
author | thomask |
---|---|
date | Tue, 26 Apr 2005 12:09:29 +0000 |
parents | dc5c9509a605 |
children | 32f7f8ce5e51 |
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 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
|
6 |
4 | 7 int main(){ |
8 bit a[]; | |
9 a.length=3; | |
10 a[0]=false; | |
11 a[1]=true; | |
12 a[2]=false; | |
13 | |
14 bit[] b=a.sort; | |
15 | |
16 assert(a.length==3); | |
17 assert(!a[0]); | |
18 assert(!a[1]); | |
19 assert(a[2]); | |
20 | |
21 assert(b.length==3); | |
22 assert(!b[0]); | |
23 assert(!b[1]); | |
24 assert(b[2]); | |
297 | 25 |
26 assert(&a != &b); | |
485 | 27 assert(a.ptr === b.ptr); |
4 | 28 |
29 return 0; | |
30 } |