How to iterate through all modules for use with the new getUnitTests trait?

Dicebot public at dicebot.lv
Thu Nov 7 04:07:38 PST 2013


On Thursday, 7 November 2013 at 10:04:57 UTC, Sönke Ludwig wrote:
> Can't you do something like this? Or is the unit test framework 
> supposed to provide its own "root"/main module?
> ...
>
> void runTests(string root_module = __MODULE__)()
> {
>    // start recursion from root_module
> }
> ---

Only issue is .di file usage - you can't access implementation 
declarations when importing those via compile-time reflection. 
Other than that I don't see any possible failure sources.


More information about the Digitalmars-d-learn mailing list