Named constructors
Atila Neves
atila.neves at gmail.com
Thu Jan 10 18:29:27 UTC 2019
On Thursday, 10 January 2019 at 16:33:51 UTC, H. S. Teoh wrote:
> On Thu, Jan 10, 2019 at 02:00:25PM +0000, Atila Neves via
> Digitalmars-d wrote:
>> [...]
> [...]
>> [...]
>
> Recently I've started to compile unittests separately from the
> final executable. The default behaviour of running unittests
> before main() is nice for one-off scripts and short-term
> projects, but for serious code I'm finding more and more that
> it makes more sense to compile and run unittests separately. I
> haven't gotten to the point of evading linker tax, though.
>
> But I surmise it should be relatively easy to just compile
> modules separately with -unittest -run, using -i to
> automatically pick up imports. Put this in a test target in
> your build script and have the tests built and run
> incrementally. Not sure how much time will be saved, due to -i
> potentially causing the same tests to run multiple times. I
> should try this out on one of my larger projects to see how it
> does.
>
>
> T
I _only_ build unit tests apart from the production code now. I'm
toying with not using `unittest` at all since I can reflect and
find tests on my own, and I don't have to pay the compile time
tax of importing a phobos module with `-unittest`.
More information about the Digitalmars-d
mailing list