It would be really useful to be able to have some unit tests which test that we're doing the right thing when writing to display_last_screen - that code is both complicated and critical to Fuse's correct functioning.
Initial commit now in the patch-387-unit-tests-for-display-c branch - very similar to the Z80 core tester, it adds a new executable which will be able to be used to call the display.c code with minimal dependencies.
I don't know a better way of doing unit tests in C than (ab)using the linker like this, but feel very free to point me to anything that exists :-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Initial commit now in the patch-387-unit-tests-for-display-c branch - very similar to the Z80 core tester, it adds a new executable which will be able to be used to call the display.c code with minimal dependencies.
I don't know a better way of doing unit tests in C than (ab)using the linker like this, but feel very free to point me to anything that exists :-)