view run/sort_10.d @ 1593:a2c2122f2f66

Remove error line information for simple tests that may legitimately have another line referenced in the error message.
author Christian Kamm <kamm incasoftware de>
date Thu, 28 Aug 2008 17:30:16 +0200
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;
}