www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Unit testing

reply noteventime gmail.com writes:
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? 
Jun 30 2006
next sibling parent reply Frits van Bommel <fvbommel REMwOVExCAPSs.nl> writes:
noteventime 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...
Jun 30 2006
parent Lars Ivar Igesund <larsivar igesund.net> writes:
Frits van Bommel wrote:

 noteventime 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
Jun 30 2006
prev sibling parent Alexander Panek <alexander.panek brainsware.org> writes:
noteventime 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? 
 
 
What's with your little testing suite? http://trac.brainsware.org/dunittest/browser/trunk/src/dunittest.d Looks very nice to me, so why not use it?
Jul 01 2006