How does D improve design practices over C++?
Robert Fraser
fraserofthenight at gmail.com
Wed Nov 5 17:58:28 PST 2008
Christopher Wright wrote:
> This is mostly the fault of the unittest runners in Tango and Phobos,
> I'd wager, but you still won't be able to name unittests without
> changing the compiler, and that's a major issue, in my opinion.
A while ago I did some work regarding this (the beginnings of it can be
seen in the Descent trunk). In a nutshell, it is possible to get D's
unit tests working just like any unit testing system (i.e. run specific
tests, run them all & track failures, etc., etc.), but it would be a
huge project.
In that framework, all tests were assigned an automatic name based on
their scope/namespace. So if you had module foo.bar with class Baz, the
unit tests in that class would be named foo.bar.Baz.0, foo.bar.Baz.1,
etc., based on their lexical ordering. I also added the ability to name
a test by adding mixin(TestName!"whatever"), but your tests would work
with the framework without any modification if you so chose.
However, all this depended on Flectioned. As Flectioned got out of date,
it became lass attractive to work on the framework, since I would
basically need to re-write/maintain Flectioned along with the test runner.
More information about the Digitalmars-d
mailing list