Program logic bugs vs input/environmental errors
Dan Olson via Digitalmars-d
digitalmars-d at puremagic.com
Thu Oct 16 08:36:33 PDT 2014
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.
--
dano
More information about the Digitalmars-d
mailing list