DUB 0.9.21 beta 1

Kapps opantm2+spam at gmail.com
Wed Dec 11 14:13:58 PST 2013


On Wednesday, 11 December 2013 at 09:51:37 UTC, Sönke Ludwig 
wrote:
> The latest GIT master version now works without requiring a 
> main file.
> Regarding integration with "tested", what should work now is to 
> import
> the automatically generated module "test_main" and use that as 
> the
> testing root:

Awesome. :)

I noticed that the main file generated seems to already support 
tested integration automatically which I find quite nice. 
Unfortunately it seems that tested is not actually following 
imports so both the above sample and the auto-generated main 
result in 0 tests being run as test_main does not directly 
contain any tests. I've tried looking in to fixing this, but it's 
proving a bit more tricky than expected and I won't have much 
time for the next couple of days. Essentially, with "static if 
(__traits(compiles, { auto tup = TypeTuple!(__traits(getMember, 
composite, M)); }))" I don't believe that that's ever true as 
assigning to tup like that is an error. Changing that to check if 
the getMember succeeds will then get past that, but now the 
recursive calls for runUnitTestsImpl will operate on the return 
type of methods as __traits(getMember, T, <somemethod>) returns 
the result of invoking the method and not the method itself. I'm 
not sure how to pass in an alias to the actual method rather than 
to the return type.


More information about the Digitalmars-d-announce mailing list