On Mon, 2006-08-14 at 09:54 -0700, Tracy R Reed wrote:
> Stewart Stremler wrote:
> > Regression testing. Putting a framework of testing in place is a good
> > way to verify bugs... when a bug report comes in, you write a test that
> > would recreate the indicated problem.
> 
> Yeah, that's what I was thinking. It seems I often modify something and 
> end up breaking it and it becomes difficult to track down.
[..snip...]

> > It's _hard_ to insert unit-testing after the fact, as the design and
> > implementation of code that wasn't designed to be tested is, oddly
> > enough, difficult to test.
> 
> Fortunately this is still a small project so it should not be that hard. 
> I just need to figure out the best way to go about it.

the first rule of writing unit tests is - don't think about it. do it.
the second rule of writing unit tests is - don't think about it. do it.

in other words - start writing _something_. you can always delete it
after a few hours, and even then you learned something. once you start
writing unit tests, it usually just flows easily, and you realize that
all the tests look the same.

in having to chose between having an incomplete set of tests, or having
nothing because you "couldn't figure out how to best do it" - always
chose the first option.

--guy


-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to