Note that if DMD Issue #2887 ever gets fixed, the line numbers for errors
in unittestBody may get messed up.
Suggested Usage:
aliasunittestSection!"MyProject_unittest"unittestMyProject;
mixin(unittestMyProject(q{// put unittests here}));
mixin(unittestMyProject("This is for class Foo", q{// put unittests here}));
That will create a named unittest section that will only run
when -unittest and -debug=MyProject_unittest are passed to DMD.
When run, the following headings will be displayed:
== unittest: the.module.name
== unittest: the.module.name: This is for class Foo
To be mixed in.
Note that if DMD Issue #2887 ever gets fixed, the line numbers for errors in unittestBody may get messed up.
Suggested Usage:
That will create a named unittest section that will only run when -unittest and -debug=MyProject_unittest are passed to DMD. When run, the following headings will be displayed:
== unittest: the.module.name == unittest: the.module.name: This is for class Foo