excalibur-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@d-haven.org>
Subject Re: Adding some test cases
Date Mon, 21 Jun 2004 16:41:49 GMT
Hamilton Verissimo de Oliveira (Engenharia - SPO) wrote:

> Hello Berin!
> 
> -----Mensagem original-----
> De: Berin Loritsch [mailto:bloritsch@d-haven.org]
> 
> 
>>May I suggest adding the testcases for the easily tested stuff first
>>(like the exception classes), and then working your way to the more
>>convoluted stuff.  I found that approach worked well for me in testing
>>and refactoring the Event/MPool stuff.
> 
> 
> I'm not sure how much valuable is to test exception classes, really. And
> those TDD I've added are not valuable, either. I've just made them to
> express my intentions of what - IMHO - Fortress 2 should be able to handle.
> 
> Have you found a bug in an exception class through test cases before? I can
> change my mind :-)

The added piece of mind of having 100% test coverage is rather important
IMO.  Perhaps some would consider it going to absurd proportions, but it
does help to get test infected and the enthusiasm will help spread to
the rest of the system.

All I am saying is to start with easy to test things and then progress
on.  You will find that the stuff that is hard to test will be
refactored to the point where it is easy to test, and consequently easy
to understand what the code is doing.  And you have the added assurance
that every line of code in the system is truly necessary.

You'd be surprised at how much code I simply removed because there was
no way to get a test to make that section of code execute.  If it never
executed it was merely wasted space.  With the existing set of tests I
could also be assured that if I removed that code it would not break
anything else.

-- 

"Programming today is a race between software engineers striving to 
build bigger and better idiot-proof programs, and the Universe trying to 
produce bigger and better idiots. So far, the Universe is winning."
                 - Rich Cook

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@excalibur.apache.org
For additional commands, e-mail: dev-help@excalibur.apache.org
Apache Excalibur Project -- URL: http://excalibur.apache.org/


Mime
View raw message