view run/unittest_04.d @ 1601:90bc51a580b7

pragma(lib, ...) is only allowed in declarations as of 1.037.
author Christian Kamm <kamm incasoftware de>
date Sun, 04 Jan 2009 22:42:52 +0100
parents 1e6afb94ce6d
children
line wrap: on
line source

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

// unittests inside of structs allowed since dmd-0.118

// __DSTRESS_TORTURE_BLOCK__ -release
// __DSTRESS_DFLAGS__ -unittest

module dstress.run.unittest_04;

bool tested;

struct MyStruct{
	unittest{
		assert(!tested);
		tested=true;
	}
}

int main(){
	assert(tested);
	return 0;
}