Add tests for galaxy::saturn::m35fd
Closed this issue · 9 comments
These tests will probably be quite involved unless...
We could cheat and grab the slot for the floppy drive without running through an assembly loop @Thatotherperson ?
Are the slots based on the index of the device in the devices vector?
@Mause look at the tests for the other devices; the idea of unit testing is that you single out a specific feature to test. We already have tests for HWN
, HWQ
, and HWI
, so we should try to avoid using them in new unit tests if possible. Luckily, it is possible.
To test the m35fd
's interrupt 0, for example, set the DCPU's A register to 0 (cpu.A = 0
), and then call m35fd.interrupt()
(where cpu
and m35fd
have already been defined - check the clock tests to see an example). Then, REQUIRE(cpu.B == blah)
and so on.
I think this might be more or less done; what's left is specific to the fstream_disk
It would seem like GitHub's normal method is to wait to close issues until their fixes are merged into the main branch, but it doesn't really matter.
Oh, right
Might be worth it for them to add some sort of notification for that, ie, "Marked to be closed when branch merged"
They actually have that, but it's a little icon that says that when you move the mouse over.