DUB 0.9.21 beta 1
Jacob Carlborg
doob at me.com
Mon Dec 2 00:19:54 PST 2013
On 2013-12-02 09:10, Sönke Ludwig wrote:
> It's similar. By default, for library projects, it generates a maim
> module of the form
> ---
> module test_main;
> import <library_name.main_module>;
> import std.stdio;
> import core.runtime;
>
> void main() { writeln("All unit tests were successful."); }
> ---
> and runs it with build type "unittest".
What if there isn't a main module for the library?
> It also supports setting a custom file containing main(), so that for
> example custom unit test runners can be specified and similar things. In
> this case, the generated file looks like this:
> ---
> module test_main;
> import <library_name.main_module>;
> import <custom_main_module>;
> ---
How is the custom file specified?
> For packages with only executable configurations it behaves the same as
> "dub run --build=unittest".
This doesn't support having the unit tests in a separate folder?
--
/Jacob Carlborg
More information about the Digitalmars-d-announce
mailing list