Thoughts about unittest run order

H. S. Teoh hsteoh at quickfur.ath.cx
Tue May 7 11:29:43 UTC 2019


On Tue, May 07, 2019 at 09:40:27AM +0000, Atila Neves via Digitalmars-d wrote:
[...]
> If the order tests run in is important, the tests are coupled...
> friends don't let friends couple their tests.

How do you decouple the tests of two functions F and G in which F calls
G? If a code change broke the behaviour of G, then both tests should
fail. Then we run into this problem with the default test runner. To
make F's tests independent of G would require that they pass
*regardless* of the behaviour of G, which seems like an unattainable
goal unless you also decouple F from G, which implies that every tested
function must be a leaf function. Which seems unrealistic.


T

-- 
The trouble with TCP jokes is that it's like hearing the same joke over and over.


More information about the Digitalmars-d mailing list