Continuous Integration
Jason House
jason.james.house at gmail.com
Thu Mar 27 06:22:06 PDT 2008
Lars Ivar Igesund Wrote:
> Jason House Wrote:
>
> > 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
> > >
> > >
> > > Sean
> >
> > 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)
>
> Here is a simple program that uses the above hook - note that you need to link one of the stacktrace libs (jive on linux) to actually get stacktraces printed on exceptions, not just assert line numbers. Also, I think it will be unable to continue after a segfault.:
Hmmm... There's some black magic in your sample. What's "ModuleInfo"? Where is it documented? The code looks like it does not run unit tests one at a time, but I'll wait for real analysis of the code until I know what's going on.
More information about the Digitalmars-d
mailing list