DUnit beta released

Derek Parnell derek at nomail.afraid.org
Wed Mar 12 19:21:50 PDT 2008


On Tue, 11 Mar 2008 21:21:29 -0400, Christopher Wright wrote:

> Hello all,
> 
> I'm pleased to announce the release of DUnit 0.1, a unittest framework 
> in the xUnit pattern for D.

I'm not putting this idea down, so please don't take my comments that way.
I am just letting you know that this solution of yours is not solving any
problem that I have :-)
 
> Why use DUnit rather than unittest{} blocks?
> 
> Have you found yourself writing "Stdout(`test for foo\n`);" at the start 
> of every unit test? Or maybe you have a template for it already.

No. I haven't needed to do that. As all unittest blocks get run, I have not
seen the need to know which ones are run, what order they are run in, or
what was the one that failed - as that is displayed by the assert() call
anyway.

> When one test fails, do you immediately comment it out to see whether 
> any other tests fail to find what the problem is?

No. I fix the problem that caused the failure and then restart the testing
process.

> Do you find yourself copying and pasting setup code between tests regularly?

No. Each test tends to be pretty unique to the situation.

> Have you spent time searching for a failed test because your tests are 
> interleaved with your code?

Never. The assert() tells me exactly which line failed. 

> If so, DUnit can offer you:
>   * organization

I have that already.

>   * named tests and fixtures

Don't need this.

>   * the guiding principle that the testing must go on! (Segfaults 
> notwithstanding.)

Of course they must. But why comment out a failing test as it probably
means that subsequent ones are also going to fail. 

-- 
Derek
(skype: derek.j.parnell)
Melbourne, Australia
13/03/2008 1:05:15 PM


More information about the Digitalmars-d-announce mailing list