unittext extension proposal

Leandro Lucarella llucax at gmail.com
Mon Aug 10 07:51:00 PDT 2009


Sergey Gromov, el 10 de agosto a las 16:32 me escribiste:
> Sat, 08 Aug 2009 17:32:30 -0400, Jeremie Pelletier wrote:
> 
> > I just had an idea to help keep track of unittests, right now we're turning on printf's at the beginning of a test to know which one fails, and adding printfs everywhere quickly becomes redundant. Also if the test succeeds and execution fails at some other point, the last printf is then misleading.
> > 
> > ---
> > module sample;
> > unittest("myTest") {}
> > ---
> 
> Named unittests is a rather often requested feature.  Others also wanted
> __UNITTEST__ to expand into a name of the current unittest.  Also a
> 'weak assert' was requested which tests and prints a message but delays
> exit until the end of the current unit test.

It would be nice if unittest could be extended to have import statements.

Even better, it would be nice to be able to use import statements in any
function or even any scope :)

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
----------------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------------
Hey you, out there beyond the wall,
Breaking bottles in the hall,
Can you help me?



More information about the Digitalmars-d mailing list