[Simh] Unit/functional testing simulators

Richard legalize at xmission.com
Wed Dec 3 11:54:38 EST 2014


In article <03006E3FC39B5A48AB9DBCCC101090A8234493FB36 at REDROOF2.alohasunset.com>,
    Mark Pizzolato - Info Comm <Mark at infocomm.com> writes:

> Well, if you're trying to 'test' a particular instruction implementation. 
> You can drive that test with SCP commands which:
>  1) load some memory with the instruction to be executed.
>         sim> DEP address <instruction-value>
> 2) load processor registers with the values you need:
>         sim> DEP Rx value1
>         sim> DEP Ry value2
>         sim> DEP PC address
> 3) single step into the instruction:
>         sim> STEP
> 4) check for expected results:
>        sim> IF Rz=value3 echo Good!

This would be a good way to do integration tests, but it's a pretty
long feedback loop for unit testing.  It also couples the unit you're
trying to test to the whole of the system, which can be problematic
sometimes.

With unit testing we want as quick of an edit/compile/test cycle as we
can get.  What I do is instrument the build so that it runs the unit
tests as part of the build cycle, so every compile that succeeds is a
compile that passes any existing unit tests.
-- 
"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