Support for unit testing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gnusim8085 |
New
|
Wishlist
|
Unassigned |
Bug Description
I have created a custom simulation engine that does some kind of primitive unit testing on 8085 programs. I am attaching an archive with a source file and a Makefile, which both should be placed inside src. After making the initial project, one can make -f Makefile.unit-test the additional executable from inside src directory. Please be aware that it may be possible that you need to setup the include and library paths inside the Makefile.
The unit testing works by reading a control file. A sample control file looks like this:
0 0 0 0 6 0 0
table: 1 2 0 4 0 6
x 0 2 x x x x
table: 1 2 3 4 5 6
The first line gives the input registers in that order: A B C D E H L. The second line defines a label (which can be used by the program) and fills the corresponding memory area with the bytes following the colon. The third lines asserts the output register values (a 'x' means ignore). The fourth line asserts the memory contents.
Another example is this:
0 LEN(text) 0 0 0 HI(text) LO(text)
text: 'aab889*%+GGGDKK'
x x x x x x x
text: 'ab89*%
Here we used some special function (LEN, HI and LO) to fill the input registers. Also we initialize memory by means of a string.
Hi George,
Thank for your contributions. Would you like commit access to the source?