Continuous Integration
Sean Kelly
sean at invisibleduck.org
Thu Mar 27 11:29:05 PDT 2008
== Quote from Jason House (jason.james.house at gmail.com)'s article
> Sean Kelly wrote:
> > == Quote from Jason House (jason.james.house at gmail.com)'s article
> >> I'd like to stay with the D style of unit tests. Maybe I should check
> >> what
> >> enhancement requests are in there. It'd be nice to be able to hook in a
> >> unit test handler...
> >
> > Tango has one. Look at "moduleUnitTester" here:
> >
> > http://www.dsource.org/projects/tango/docs/current/tango.core.Runtime.html
> >
> See http://d.puremagic.com/issues/show_bug.cgi?id=1952 for the enhancement
> request. Per unit test customization (such as a unit test name) is very
> useful to have. I also don't see a way to tell the program to run all unit
> tests (and just report the individual passes/failures)
Yes, there is no way to name the built-in unit tests. That would be a nice feature to have, so long as
the name were optional. I've been asking for unittest blocks to get a more function-like syntax anyway,
to match invariant in D 2.0, so this provides a good reason for the syntax. As for running all unit tests,
simply have your unit tester perform each unit test in a try block/catch block. If an exception is thrown
then the test failed, otherwise it succeeded.
Sean
More information about the Digitalmars-d
mailing list