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

Dicebot public at dicebot.lv
Wed Nov 6 13:48:53 PST 2013


On Wednesday, 6 November 2013 at 21:36:52 UTC, Daniel Davidson 
wrote:
> I don't think it works that way, as how could a compile time 
> test module know about modules that have pulled it in?

Exactly. __traits work during compile-time. If module is not 
imported, it is not known during compile-time -> no trait 
unittest access possible. In lot of programs it will be 
accessible recursively via some indirect import though.


More information about the Digitalmars-d-learn mailing list