std.unittests for (final?) review

Jens Mueller jens.k.mueller at gmx.de
Mon Jan 3 13:06:24 PST 2011


Walter Bright wrote:
> Jens Mueller wrote:
> >Unit testing can be implemented on top of the
> >language and shouldn't be put into it. Somehow I have the feeling that
> >too often one tries to extend the language even though the feature could
> >be implemented in a library.
> 
> On the other hand, the built-in D unit test ability has been a huge success.
> 
> A unit test facility that is not used is worthless, no matter how
> capable it is. The advantage of it being simple and built-in is it
> gets used, and I think there's strong evidence that this is true for
> D.

Yes. I do not disagree. I like having unittest in the language.
Extending the basic built-in unit testing support should not be done
inside the language, if it can be done conveniently as a library.
And the built-in unit testing is very helpful and necessary. But it
should be possible to build extended testing frameworks (as there are in
Java, C++, etc.) on top of these.

Sorry. My very first sentence was very misleading. I wanted to say that
further/advanced unit testing shouldn't be put into the language. We all
agree on that, don't we?
Maybe we can get a discussion what features are considered useful in a
testing framework library and what needs to be changed in the built-in
testing to make such a library happen.

Jens


More information about the Digitalmars-d mailing list