selectively running unittest functions

Daniel Davidson nospam at spam.com
Fri Oct 25 09:43:21 PDT 2013


On Friday, 25 October 2013 at 14:14:39 UTC, Dicebot wrote:
> This will work starting with 2.064:

Ok. I'll keep pressing. Here is an updated version: 
http://pastebin.com/g6FWsTkr

The idea is to be able to just import ut, annotate as you have 
described and get unit tests run. I want to mixin the equivalent 
of your "main" in each module that just pulls in a module 
constructors to evaluate what tests are there. The code in the 
paste crashes on the call to getUnitests.

If I comment out `alias tests = TypeTuple!(__traits(getUnitTests, 
mod));` then I see similar call to  `alias members = 
TypeTuple!(__traits(allMembers, mod));` work just fine.

Is this the right way to use this? Any pointers on the 
segmentation fault?

Thanks
Dan


More information about the Digitalmars-d-learn mailing list