Am 03.12.2013 10:34, schrieb Atila Neves: >> It also supports setting a custom file containing main(), so that for >> example custom unit test runners can be specified and similar > > > Awesome! > >> things. In >> this case, the generated file looks like this: >> --- >> module test_main; >> import <library_name.main_module>; >> import <custom_main_module>; >> --- >> >> For packages with only executable configurations it behaves the same as >> "dub run --build=unittest". > > So custom_main_module defines the main function to be executed? >
Exactly. main() will usually be empty, as unit tests by default run before main() is called, but it can be used to disable the standard Runtime.moduleUnitTester and do something customized.