Post #1904264
2025-12-30 23:26 UTC
@BarneyDellar @qcoding
Given a function like:
F()
{
a();
b();
if (c()) { d(); }
}
It makes sense to have test(s) for when `c` is true and other test(s) for when it's false.
But don't have some test(s) for the `a` effects and some test(s) for the `b` effects. If the `a` and `b` effects need to be verified, assert them both in the same test.
And yes: if this makes your tests undesirable in some way, refactor.
Replies (0)
No replies.