Unit testing

Lars Ivar Igesund larsivar at igesund.net
Fri Jun 30 14:07:46 PDT 2006


Frits van Bommel wrote:

> noteventime at gmail.com wrote:
>> Hello,
>> I've been using D for two weeks or so now, coming from C++. The only
>> thing currently forcing me to stay with C++ is the lack of a real
>> unittesting. I have been trying to create one myself but unfortunately D
>> lacks a few features to create one, something like javas annotations,
>> (/me ducks) C/C++s preprocessor or something similar to VM/Scripting
>> languages reflection support, I've heard better reflection support is on
>> its way, but I'm not sure it's more than just rumors.
>> Just saying what is holding me, and probably a few others, from using D.
>> Is there better unittesting/something that would enable the creation of a
>> framework on its way?
> 
> 
> Uhm... Have you looked at http://www.digitalmars.com/d/class.html#unittest
> ?
> 
> I agree it's not ideal since they're run when you run the program
> instead of on compilation, but since you didn't mention it I thought I'd
> point it out...

He is aware of it, and I agree that it isn't very useful in a larger testing
framework. As I see it, either we get proper reflection support (and
preferably something like Java's annotations to go along with it), or we
use preprocessing (or possibly a combination for ultimate power). Since
reflection (and annotation type like functionality) will be useful in a
much wider dev space than just testing, I think it will require thorough
and extensive discussions when we have some idea of what kind of reflection
support Walter plans. It will also have to be seen in conjunction with
mixins as these features in total should make for fairly complete AOP
techniques in D (and parts of what annotations are used for in Java today,
can be done with mixins in D).

-- 
Lars Ivar Igesund
blog at http://larsivi.net
DSource & #D: larsivi



More information about the Digitalmars-d mailing list