
# jeff@crystalclearsoftware.com / 2006-09-14 10:57:36 -0700:
Is it economical to spend time writing code to check a 'getter'/'setter' interface that will just obviously work? The answer is no. In fact, the testing you can avoid, just like the coding you can avoid, is really a big part of successful big system development.
I often write such tests because I know I tend to make this kind of mistakes (unfinished editing after copy/paste): struct astruct { int x() { return x_; } int y() { return y_; } int z() { return x_; } private: int x_, y_, z_; } Hoping that I'll spot these while checking the code after I add it proved to be hopeless, and these microscope tests pinpoint the problem. Otherwise I need to track the bug from the results of higher level tests, which may usually takes (me) more time. -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991