5 ms·
If I already have passing tests for anything function A might do, I can safely assume it will behave the same when called from B, C and D.
by worksonmine 2y ago
If I already have passing tests for anything function A might do, I can safely assume it will behave the same when called from B, C and D.
- t43562 2y agoIn some languages A might free a memory allocation e.g. after communicating with some server. If B also frees that memory then there is a bug. Presumably this means B's tests are wrong/incomplete. If B was mocking A to avoid the IO, you might not find out.