Should unittests run as logical part of compilation?

Idan Arye GenericNPC at gmail.com
Mon Jan 27 04:18:53 PST 2014


On Monday, 27 January 2014 at 11:10:04 UTC, Alix Pexton wrote:
> On 27/01/2014 4:15 AM, Andrei Alexandrescu wrote:
>> On 1/26/14 8:08 PM, Jesse Phillips wrote:
>>> On Monday, 27 January 2014 at 03:58:54 UTC, Andrei 
>>> Alexandrescu wrote:
>>>> Yeppers. One other thought I had was to define a special 
>>>> flag e.g.
>>>> --4c5ad7908c2aa1b3de32ea25968cdf49 that says "just run 
>>>> unittests".
>>>
>>> I really think it would be better to use
>>> --4c5ad7908c2aa1b3de42ea25968cdf49 instead, it just makes the 
>>> intent
>>> clearer.
>>
>> I'm just saying it should not clash with any application 
>> argument.
>>
>> Andrei
>
> Hows about making it so that unittests are only run if the 
> executable name has a "_ut" suffix, or some other special 
> name/convention?
>
> A...

How about exposing the sybmol of the function that runs the 
unittest, and having a "dunittest" tool for running the tests 
stored inside a regular executable? (I think it's possible?)


More information about the Digitalmars-d mailing list