Named unittests and __traits(getModules)

Jacob Carlborg doob at me.com
Thu May 23 18:01:32 UTC 2019


On 2019-05-21 11:43, Atila Neves wrote:

> How would this work with separate compilation?

I have given this some more thought. For my idea to work, regardless of 
separate compilation, I think the compiler needs to invoke a template 
that uses `__traits(getRootModules)` which collects all tests. If it's 
not a template I'm guessing this would contain the files passed to the 
compiler when druntime was built and not when the user application is built.

Then it would collect the unit tests to a global variable, that should 
work with separate compilation as well, I think.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list