Support for unit testing

Bug #579369 reported by George Prekas
6
This bug affects 1 person
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*%+GDKAB89*%+gdk'

Here we used some special function (LEN, HI and LO) to fill the input registers. Also we initialize memory by means of a string.

Tags: sim-engine
Revision history for this message
Sridhar Ratnakumar (srid) wrote :

Hi George,

Thank for your contributions. Would you like commit access to the source?

Revision history for this message
George Prekas (prekageo) wrote :

The other two patches (support for character literals and support for DW) can actually be committed without any risk after sanitizing the whitespaces.

The specific patch needs more thought on how is it supposed to be offered to the end user. There is no GUI. Should it be just one more executable that is produced after make? In that case, it won't be a lot of work to write a little bit of documentation and merge the Makefile into the existing configure.ac.

If you would like I could take the step and commit the first two patches. For the third one, I would like to hear your opinions.

Revision history for this message
Bug Importer (bug-importer) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.