Beta 2.090.0
Steven Schveighoffer
schveiguy at gmail.com
Wed Dec 25 15:21:51 UTC 2019
On 12/23/19 4:59 PM, Per Nordlöw wrote:
> On Sunday, 22 December 2019 at 23:05:20 UTC, Steven Schveighoffer wrote:
>> extern(C) __gshared string[] rt_options = [ "testmode=run-main"];
>>
>> There are far more people who run unittests as a separate step from
>> running their application. If unittests pass, then there's no
>> distinguishable output from a build without unittests. I can totally
>> imagine accidentally shipping code with unittests in it without
>> intending to.
>
> Thanks.
>
> So what is now the difference between
>
> dub run --build=unittest
>
> and
>
> dub test
>
> ?
dub test adds its own main function and unittest handler (and actually
the function is based on the old unittest system, so it won't print the
tests run or number of failures. It usually only works for libraries
which don't have a main function.
-Steve
More information about the Digitalmars-d-announce
mailing list