Possible solution for export : `unittest export`?
deadalnix via Digitalmars-d
digitalmars-d at puremagic.com
Fri Sep 4 09:54:01 PDT 2015
On Friday, 4 September 2015 at 16:26:15 UTC, Andrei Alexandrescu
wrote:
> On 09/02/2015 05:07 PM, deadalnix wrote:
>> On Wednesday, 2 September 2015 at 09:28:49 UTC, Dominikus
>> Dittes Scherkl
>> wrote:
>>>> It is not unitestable.
>>> But we have concepts like "thread local per default" and
>>> message
>>> passing that should make avoiding race conditions easier. And
>>> concurrent code doesn't prevent us from testing all paths of
>>> templates.
>>
>> I was responding to the statement that you should unittest
>> everything.
>>
>> That is simply not true. For some code, this is not possible,
>> for some
>> other code, it gives poor noise to signal ratio.
>
> What would be a good litmus test "this code needs/doesn't need
> unittesting"? -- Andrei
IMO, is the test going to be reliable or break easily is probably
the most important parameter. You want unitests to have a high
noise to signal ratio so they can be part of the build and/or run
on every PR.
There is obviously a grey area where reasonable people will
disagree on the cost benefit ratio.
A good litmus test would be "is there a lot of parameter that
aren't under my control that affect this piece of code ?"
More information about the Digitalmars-d
mailing list