view run/new_10.d @ 1622:d402aa53926c

Add test for bug 3092 written by Manuel K?nig
author Leandro Lucarella <llucax@gmail.com>
date Tue, 19 Oct 2010 19:18:23 -0300
parents b3da1b510a19
children
line wrap: on
line source

// $HeadURL$
// $Date$
// $Auhthor$

module dstress.run.new_10;

int counter;

class MyClass{
	this(){
		assert(counter==0);
		counter++;
	}

	new(size_t size){
		return (new byte[size]).ptr;
	}			
}

int main(){
	MyClass c;
	assert(counter==0);
	c = new MyClass();
	assert(counter==1);
	return 0;
}