- findModuleEntriesDirEntry[] findModuleEntries(Options options) 
- Undocumented in source. Be warned that the author may not have intended to support it. 
- findModuleNamesstring[] findModuleNames(Options options) 
- Undocumented in source. Be warned that the author may not have intended to support it. 
- getGenUtOptionsOptions getGenUtOptions(string[] args) 
- Undocumented in source. Be warned that the author may not have intended to support it. 
- removePackagestring removePackage(string name) 
- Undocumented in source. Be warned that the author may not have intended to support it. 
- toDirEntryauto  toDirEntry(string a) 
- Undocumented in source. Be warned that the author may not have intended to support it. 
- writeUtMainFilestring writeUtMainFile(string[] args) 
- Undocumented in source. Be warned that the author may not have intended to support it. 
- writeUtMainFilestring writeUtMainFile(Options options) 
- Undocumented in source. Be warned that the author may not have intended to support it. 
This module implements a template mixin containing a program to search a list of directories for all .d files therein, then writes a D program to run all unit tests in those files using unit_threaded. The program implemented by this mixin only writes out a D file that itself must be compiled and run.
To use this as a runnable program, simply mix in and compile:
Generally however, this code will be used by the gen_ut_main dub configuration via dub run.
By default, genUtMain will look for unit tests in CWD and write a program out to a temporary file. To change the file to write to, use the -f option. To change what directories to look in, simply pass them in as the remaining command-line arguments.
The resulting file is also a program that must be compiled and, when run, will run the unit tests found. By default, it will run all tests. To run one test or all tests in a particular package, pass them in as command-line arguments. The -h option will list all command-line options.
Examples (assuming the generated file is called ut.d):