(t *testing.T)
| 637 | } |
| 638 | |
| 639 | func TestALUAddWithCarry(t *testing.T) { |
| 640 | ClearMem() |
| 641 | testALUAddWithCarry( |
| 642 | 0x0080, |
| 643 | [4]uint16{0xFFFE, 0x0000, 0x0000, 0x0000}, |
| 644 | [4]uint16{0x0001, 0x0000, 0x0000, 0x0000}, |
| 645 | t, |
| 646 | ) |
| 647 | |
| 648 | testALUAddWithCarry( |
| 649 | 0x0081, |
| 650 | [4]uint16{0xFFFE, 0x0005, 0x0000, 0x0000}, |
| 651 | [4]uint16{0x0000, 0x0001, 0x0000, 0x0000}, |
| 652 | t, |
| 653 | ) |
| 654 | |
| 655 | testALUAddWithCarry( |
| 656 | 0x0082, |
| 657 | [4]uint16{0xFFFE, 0x0000, 0x0005, 0x0000}, |
| 658 | [4]uint16{0x0000, 0x0000, 0x0001, 0x0000}, |
| 659 | t, |
| 660 | ) |
| 661 | |
| 662 | testALUAddWithCarry( |
| 663 | 0x0083, |
| 664 | [4]uint16{0xFFFE, 0x0000, 0x0000, 0x0005}, |
| 665 | [4]uint16{0x0000, 0x0000, 0x0000, 0x0001}, |
| 666 | t, |
| 667 | ) |
| 668 | } |
| 669 | |
| 670 | func testALUAddWithCarry(instruction uint16, inputRegisters, expectedOutputRegisters [4]uint16, t *testing.T) { |
| 671 | c := SetUpCPU() |
nothing calls this directly
no test coverage detected