Improving unit tests

Jason House jason.james.house at gmail.com
Fri Nov 7 13:55:14 PST 2008


Janderson Wrote:

>  > Someone who's a big unittesting fan should write up a proposal on
>  > this.  I think unittests are neat and all -- I probably don't use them
>  > as much as I should -- but I don't really know what's so great about
>  > named unittests or other things people mention that D's unittests
>  > lack.  I suspect Walter may be in the same boat.  You can't address a
>  > problem if you don't really understand it.
>  > --bb
> 
> Its funny, I was just thinking last night of starting a new thread about 
> exactly that.  For me I only ever use unit tests in a simple way however 
> I'd like to learn about move advanced features that D is missing.
> 
> I was originally thinking, maybe unit tests shouldn't be part of D to 
> allow for innovation. However then I though, what about if D's unit 
> tests where extensible though some language syntax?
> 
> Questions:
> 1) What features are missing from D's unit tests that you miss?

Named unit tests
Reporting individual failures and continuing. Note that you can recover from module testing failures, but not from individual tests.
Compile-time unit tests, especially when making release builds.

 
> 2) Should D decouple unittests from the language or should there be 
> language changes to allow for for more extensible unit tests?

I like having them built in.

 
> 3) If you chose "more extensible unit tests" what language features 
> would be needed to make this happen.

I hope an author of one of the DUnit libraries answers this part.
> 
> -Joel




More information about the Digitalmars-d mailing list