view run/f/foreach_33_D.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 9dcac8d4e97f
children
line wrap: on
line source

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

module dstess.run.f.foreach_33_D;

int main(){
	int sum = 0;
	int sumI = 0;

	char[] data = "\u0001\u0010\u0030\u0000";

	foreach(i, c; data){
		sumI += i;
		sum += c;
	}

	if(sum != 0x41){
		assert(0);
	}

	if(sumI != 6){
		assert(0);
	}

	return 0;
}