How to iterate through all modules for use with the new getUnitTests trait?
Gary Willoughby
dev at nomad.so
Wed Nov 6 14:33:46 PST 2013
foreach (module_; ModuleInfo)
{
auto func = module_.unitTest;
func(); // run tests;
}
The above code retrieves all of the current project's modules and
then grabs each module's unit test blocks. The only trouble is
that the module's unit tests are kinda rolled into one function
as show by the 'func' variable above. It would be nice to do this
but get each individual unit test instead of dealing with these
rolled up versions.
More information about the Digitalmars-d-learn
mailing list