view run/slice_05.d @ 4:1ed6616fe905

extended array tests
author thomask
date Sun, 26 Sep 2004 15:54:31 +0000
parents
children f87ba6507260
line wrap: on
line source

int main(){
	byte[] a;
	a.length=2;
	a[] = 1;
	assert(a[0]);
	assert(a[1]);
	
	byte[] b;
	b.length=2;
	assert(!b[0]);
	assert(!b[1]);
	
	b[1..2] = a[0..1];
	assert(!b[0]);
	assert(b[1]);

	return 0;
}