view norun/a/assert_10_C.d @ 756:9a121126b077

major "Torture" review
author thomask
date Sat, 03 Dec 2005 22:19:07 +0000
parents 587fc78f969a
children b8c0195059d9
line wrap: on
line source

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

// @author@	Derek Parnell <derek@psych.ward>
// @date@	2005-05-31
// @uri@	news:151tzf2ee9law$.15kklgaxy0bfr$.dlg@40tude.net
// @desc@	invalid code generation

// __DSTRESS_ELINE__ 32
// __DSTRESS_TORTURE_BLOCK__ -release

module dstress.norun.a.assert_10_C;

const int dummy = 1000;
dchar[] SomeFunc( dchar[] pText, out int pStopPosn){
	if(pText.length == 0){
		pStopPosn = 0;
	}else{
		pStopPosn = -1;
	}
	return pText.dup;
}

int main(){
	int sp;

	SomeFunc("123", sp);
	assert(sp == -1);

	SomeFunc("", sp);
	assert(sp == -1);

	return 0;
}