Mercurial > projects > dstress
view run/d/delete_12_B.d @ 1489:b8c0195059d9
changed nntp: URLs to http: URLs
author | thomask |
---|---|
date | Mon, 09 Apr 2007 13:47:01 +0000 |
parents | 9dcac8d4e97f |
children | 8d5c55d163fd |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ Nick <Nick_member@pathlink.com> // @date@ 2006-02-15 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=6267 module dstress.run.d.delete_12_B; int status; class Foo{ int i; new(size_t sz){ void* p; p = (new byte[sz]).ptr; if(status++ != 1){ assert(0); } return p; } delete(void* p){ if(status++ != 2){ assert(0); } } } void test(){ auto Foo f = new Foo(); } int main(){ if(status++ != 0){ assert(0); } test(); if(status++ != 3){ assert(0); } return 0; }