begin  quoting guy keren as of Tue, Aug 15, 2006 at 12:13:22AM +0300:
[snip]
> 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.

It's easier to start this way than it is to retrofit.

It's better to retrofit than to not test at all.

I'm trying to figure out how to wedge in some unit tests into a
rather large and involved C++/CORBA application.  Right now, we have
manual functional tests, some of which consist of running in the
debugger. Bleah.
 
> 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.

doTest() {
  setup(); 
  test(); 
  display(); 
  cleanup();
}

> 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.

A framework is nice, but lack of same shouldn't keep one from writing
a test -- although it often does. :(

-- 
_ |\_
 \|

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

Reply via email to