[Simh] Unit/functional testing simulators

Richard legalize at xmission.com
Wed Dec 3 11:49:28 EST 2014


In article <20141203015411.GA10545 at loomcom.com>,
    Seth Morabito <lists+simh at loomcom.com> writes:

> I'd love to see testing come to SIMH. It's never too late!

Me too.  I have lots of experience retrofitting unit tests onto
existing code, so I can help out here.

I am very happy to see that simh is now on github!  This should make
it easy for us to collaborate.  Seth, if you want to try something on
a fork of the main repository and engage me in a discussion of how to
approach this, I'm happy to help.

For a body of code like SIMH, it might be good to try to cover a huge
chunk of its existing behavior by writing an acceptance test around
it.  This can be as simple as some sort of script that runs a program
in the simulated environment and then does a dump of memory and
validates the contents of memory.

I like to have both kinds of tests in my code base: unit tests to
catch small mistakes in a particular function or class, integration
tests to catch mistakes that only arise when multiple functions/clasess
work together to achieve some larger objective.

You cna do integration testing on an ad-hoc basis or using a framework
like FitNesse <http://www.fitnesse.org>.  I like fitnesse because it
allows your integration tests to be declarative in nature for
capturing business rules and whatnot.  For SIMH maybe that isn't so
important, but it sure is handy to have the fitnesse infrastructure
to organize your tests into suites and so-on.  Testing C/C++ code is
well supported from FitNesse.
-- 
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
     The Computer Graphics Museum <http://ComputerGraphicsMuseum.org>
         The Terminals Wiki <http://terminals.classiccmp.org>
  Legalize Adulthood! (my blog) <http://LegalizeAdulthood.wordpress.com>


More information about the Simh mailing list