(instruction uint16, inputRegisters [4]uint16, expectedOutputRegisters [4]uint16, shifts uint16, t *testing.T)
| 844 | } |
| 845 | |
| 846 | func testShift(instruction uint16, inputRegisters [4]uint16, expectedOutputRegisters [4]uint16, shifts uint16, t *testing.T) { |
| 847 | c := SetUpCPU() |
| 848 | |
| 849 | var i uint16 |
| 850 | for i = 0; i < shifts; i++ { |
| 851 | setMemoryLocation(c, i, instruction) |
| 852 | } |
| 853 | |
| 854 | for i, r := range inputRegisters { |
| 855 | setRegister(c, i, r) |
| 856 | } |
| 857 | |
| 858 | c.SetIAR(0x0000) |
| 859 | |
| 860 | for i = 0; i < shifts; i++ { |
| 861 | doFetchDecodeExecute(c) |
| 862 | } |
| 863 | |
| 864 | checkRegisters(c, expectedOutputRegisters[0], expectedOutputRegisters[1], expectedOutputRegisters[2], expectedOutputRegisters[3], t) |
| 865 | } |
| 866 | |
| 867 | func TestSubtract(t *testing.T) { |
| 868 | ClearMem() |
no test coverage detected