External lib unittests: they're killin me!

Nick Sabalausky SeeWebsiteToContactMe at semitwist.com
Tue May 21 11:36:28 PDT 2013


On Tue, 21 May 2013 12:23:01 -0400
"Steven Schveighoffer" <schveiguy at yahoo.com> wrote:

> On Mon, 20 May 2013 21:52:51 -0400, Nick Sabalausky  
> <SeeWebsiteToContactMe at semitwist.com> wrote:
> 
> > So alright...Who's with me?!!! "Yeaaaa......!!!!!" (<-- Belushi
> > running out the door)
> >
> 
> I think we can handle this without compiler help.
> 
> The runtime is responsible for running unit tests.
> 
> It actually provides a hook to allow you to override the unit tests.
> See here:
> http://dlang.org/phobos/core_runtime.html#.Runtime.moduleUnitTester
> (set in a shared static ctor).  All you have to do is just run the
> module's unit tests you desire.
> 

Neat, I had no idea.

> I would argue the "stock" unit test runner could be configured by an  
> environment variable to be able to run/exclude whatever you want.
> This is eminently fixable in the library with a small pull request.
> 

I think that definitely sounds like the way to go.



More information about the Digitalmars-d mailing list