Program logic bugs vs input/environmental errors

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Thu Oct 16 11:50:30 PDT 2014


On 10/16/2014 8:36 AM, Dan Olson wrote:
> Walter Bright <newshound2 at digitalmars.com> writes:
>
>> On 10/15/2014 7:35 AM, Dan Olson wrote:
>>> That is what I am looking for, just being able to continue from a failed
>>> assert in a unittest.
>>
>> Just use enforce() or something similar instead of assert(). Nothing says
>> you have to use assert() in a unittest.
>
> Makes sense.  However it is druntime and phobos unittests that already use
> assert.  I have convinced myself that catching Throwable is just fine in my
> case because at worst, unittests that follow an Error might be tainted, but
> only a perfect score of passing all tests really counts.

I don't understand why unittests in druntime/phobos are an issue for users. We 
don't release a DMD unless they all pass - it should be moot for users.



More information about the Digitalmars-d mailing list