view run/f/foreach_31_A.d @ 1586:a74f0139fc3d

Fix tests using typeof on types.
author Christian Kamm <kamm incasoftware de>
date Thu, 21 Aug 2008 15:42:21 +0200
parents f7434744e991
children
line wrap: on
line source

// $HeadURL$
// $Date$
// $Author$

module dstress.run.f.foreach_31_A;

int main(){
	int[] index;
	char[] value;

	foreach(int i, char c; "_\U00012345-"){
		index ~= i;
		value ~= c;
	}

	assert(value.length == 6);
	assert(value[0] == '_');
	assert(value[1] == 0xF0);
	assert(value[2] == 0x92);
	assert(value[3] == 0x8D);
	assert(value[4] == 0x85);
	assert(value[5] == '-');

	assert(index.length == 6);
	assert(index[0] == 0);
	assert(index[1] == 1);
	assert(index[2] == 2);
	assert(index[3] == 3);
	assert(index[4] == 4);
	assert(index[5] == 5);

	return 0;
}