view run/v/variadic_argument_07_B.d @ 1125:a929acac9127

various test case fixes
author thomask
date Wed, 06 Sep 2006 05:07:33 +0000
parents 8a97cee4e7a0
children b8c0195059d9
line wrap: on
line source

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

// @author@	David L. Davis <SpottedTiger@yahoo.com>
// @date@	2005-09-22
// @uri@	news:dgup0c$1j47$1@digitaldaemon.com

module dstress.run.v.variadic_argument_07_B;

int counter;

void test(char[] s){
	if(s != "string"){
		assert(0);
	}
	counter++;
}

void test(...){
	assert(0);
}

int main(){
	if(counter != 0){
		assert(0);
	}
	
	test("string");
	if(counter != 1){
		assert(0);
	}
	
	test(cast(char[])"string");
	if(counter != 2){
		assert(0);
	}
	
	test("string"c);
	if(counter != 3){
		assert(0);
	}
	
	return 0;
}