Mercurial > projects > dstress
view run/sort_10.d @ 1622:d402aa53926c
Add test for bug 3092 written by Manuel K?nig
author | Leandro Lucarella <llucax@gmail.com> |
---|---|
date | Tue, 19 Oct 2010 19:18:23 -0300 |
parents | dc5c9509a605 |
children |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ module dstress.run.sort_10; int main(){ ushort a[]; a.length=7; a[0]=ushort.max; a[1]=ushort.max-1; a[2]=2; a[3]=0; a[4]=1; a[5]=ushort.min; a[6]=ushort.min+1; ushort[] b=a.sort; assert(a.length==7); assert(a[0]==0); assert(a[1]==ushort.min); assert(a[2]==ushort.min+1); assert(a[3]==1); assert(a[4]==2); assert(a[5]==ushort.max-1); assert(a[6]==ushort.max); assert(b.length==7); assert(b[0]==0); assert(b[1]==ushort.min); assert(b[2]==ushort.min+1); assert(b[3]==1); assert(b[4]==2); assert(b[5]==ushort.max-1); assert(b[6]==ushort.max); assert(&a != &b); return 0; }