3 ms·
> verifying your ADD function did indeed add N consecutive numbers correctly This kinda depends on if it is a public or private (or `__private(self):`) method.
by afarrell 9y ago
> verifying your ADD function did indeed add N consecutive numbers correctly
This kinda depends on if it is a public or private (or `__private(self):`) method. If its private, no need to test it. But suppose that rather than using something in an existing library, you are bothering to write your own ADD function and expose it to the rest of your codebase. Wouldn't that indicate that your function was special enough that it should be tested?
- blackflame7000 9y agoI mean yea it should be tested, but making a code change that propagates through the rest of the repository is really poor abstraction design. At that point, you might as well have one class called tester that holds pointers to everything and is about 100K lines long.