Program logic bugs vs input/environmental errors

Atila Neves via Digitalmars-d digitalmars-d at puremagic.com
Fri Oct 17 01:26:42 PDT 2014


> No, right now one can affect the way tests are run by simply 
> replacing the runner to a custom one and it will work for any 
> amount of modules compiled in. Beauty of `unittest` block 
> approach is that it is simply a bunch of functions that are 
> somewhat easy to discover from the combined sources of the 
> program - custom runner can do pretty much anything with those. 
> Or it could if not the issue with AssertError and cleanup.

Is cleaning up in a unittest build a problem? I'd say no, if it 
the tests fail it doesn't make much sense to clean up unless it 
affects the reporting of tests failing.

I catch assertion errors in unit-threaded exactly to support the 
standard unittest blocks and can't see why I'd care about 
clean-up. At least in practice it hasn't been an issue, although 
to be fair I haven't used that functionality a lot (of using 
unit-threaded to run unittest blocks).

Atila


More information about the Digitalmars-d mailing list