On Fri, Mar 28, 2008 at 07:26:39AM -0700, Ovid wrote:
> --- Michael G Schwern <[EMAIL PROTECTED]> wrote:
> > It declares the inputs and outputs, not the business rule.
> OK, but this all sidesteps one very important question:  has anyone on
> this list ever *really* used FIT?  I'm not talking about toy examples. 
> I'm not talking about "I know a guy who ..."  I would love to hear
> real, live stories about it and what follows is why.

Yes.

CPU::Emulator::Z80 has a load of tests that specify inputs like:

  start with 1234 in the BC register
  start with 4321 in the program counter
  start with 0x34 at memory location 5678
  and so on

they then say "after running for four clock cycles the state should be
..." and another set of register values and the contents of various
memory locations.

> Those of them who have worked with FIT are also those who object to it
> the loudest.  "Too painful to implement and maintain".

I can see that.  Thankfully, I didn't have to create all the data files,
I took them from another emulator.

>                                                         "Too difficult
> to train users."  "Too difficult to get users to participate."  "Too
> little bang for the buck compared to other testing methodologies."

Again, I can see the first two.  However, the third is, at least in my
case, dead wrong.  Those data were what I needed to attain the ideal of
test-driven development - that is, run the tests, see what fails, write
some code to pass a test, repeat until they all pass, then stop.

The end result is code that works very well, took only three weeks or so
of evenings to write, and has very good test coverage.  There's a small
number of conditionals that aren't taken (I put the conditionals in
based on what the hardware docs said, but obviously not all possible
variations exist in the tests) so at some point I'm going to add tests
for them.

> In other words, it seems that as a general rule, those who support FIT
> the most seem to be those who haven't used it.  I'm just trying to find
> out if this experience matches the rest of the world.

I would like to use it for the Z80 assembler I'm writing.  Trouble is,
this time I have to write all the test case data myself instead of just
using someone elses, and so I'm procrastinating.

-- 
David Cantrell | top google result for "internet beard fetish club"

PLEASE NOTE: This message was meant to offend everyone equally,
regardless of race, creed, sexual orientation, politics, choice
of beer, operating system, mode of transport, or their editor.

Reply via email to