3 ms·
>I don't write tests for getters and setters. >I don't write tests for member variables. >I don't write tests for one line functions or functions that are obv
by njharman 14y ago
>I don't write tests for getters and setters.
>I don't write tests for member variables.
>I don't write tests for one line functions or functions that are obviously trivial.
I don't disagree, but I often have at least one test that explicitly exercises all of the public interface (of a class/module/whatever). The point is when I change that interface I want tests to break and not have to rely on my memory on what changed when writing release notes / incrementing version number. I mostly test python, YMMV.
- jdlshore 14y agoThose tests are less necessary in languages with static typing, which is Bob Martin's background.