Program logic bugs vs input/environmental errors

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Wed Oct 15 23:11:46 PDT 2014


On 2014-10-15 16:25, Dicebot wrote:

> How can one continue without recovering? This will result in any kind of
> environment not being cleaned and false failures of other tests that
> share it.

I will probably use something else than "assert" in my unit tests. 
Something like assertEq, assertNotEq and so on. It's more flexible, can 
give better error message and I can have it throw an exception instead 
of an error. But there's still the problem with asserts in contracts and 
other parts of the code.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list