Ian Collins wrote, On 02/09/07 01:35:
Um, I've never seen one like that before, probably because TDD doesn't
yield that type of code.
That is only true if it produces more complex code. The 20 odd lines of
code resulted from a requirement to implement two simple looking
equations and one simple statement in English. The reason it was so many
test cases was that it was dealing with one angle in the range +/- 270
degrees, one in the range +/-170 degrees and two in the range +/1 6
degrees. The testing had to verify behaviour with every angle in each
quadrant, every angle at 0, 90 etc, every angle just either side etc. It
was the *maths* together with the chances of selecting the wrong
solution from the trig that meant a lot of test cases, not the
complexity of the code.
Sounds like the US DOD, I'm sure they just weigh or measure
documentation rather than read it!
You guessed right, but the important thing is the quantity of tests and
therefore the time it would take to run them all.
Those were the days. Thank goodness for fast CPUs and distributed building.
Also the larger projects which tie up the processors for just as long
because they are so much more complex.
I know there is still SW that takes hours to build because within the
last few years I have done builds that have taken hours.