Unit tests, asserts and contradictions in the spec

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Feb 7 18:53:22 UTC 2019


On Thu, Feb 07, 2019 at 06:10:58PM +0000, jmh530 via Digitalmars-d wrote:
> On Thursday, 7 February 2019 at 15:43:34 UTC, H. S. Teoh wrote:
> > [snip]
> > Of course, on the flip side, unittests that acquire global /
> > external resources that need cleanup, etc., are IMNSHO a code smell.
> 
> That's a good point. I should probably just stick pure on every
> unittest block by default.

That's a good ideal to strive for, but then it would preclude testing
non-pure functions, which seems rather too limiting to me.


T

-- 
There are 10 kinds of people in the world: those who can count in binary, and those who can't.


More information about the Digitalmars-d mailing list